Closed blazsvigelj closed 1 year ago
When calling ArchiveHooks with retainedFileCountLimit the target directory is ignored.
ArchiveHooks
retainedFileCountLimit
Fore example: new ArchiveHooks(3, CompressionLevel.Fastest, "/archive"); will never move compressed files in /archive folder.
new ArchiveHooks(3, CompressionLevel.Fastest, "/archive");
/archive
Possible solution: https://github.com/cocowalla/serilog-sinks-file-archive/blob/d3a20bbba4282284aedd174f25f296ddac097af8/src/Serilog.Sinks.File.Archive/ArchiveHooks.cs#L50
should be this.targetDirectory = targetDirectory;
this.targetDirectory = targetDirectory;
@blazsvigelj thanks for finding this, it's now been fixed and a new version pushed: https://www.nuget.org/packages/Serilog.Sinks.File.Archive/1.0.3
When calling
ArchiveHooks
withretainedFileCountLimit
the target directory is ignored.Fore example:
new ArchiveHooks(3, CompressionLevel.Fastest, "/archive");
will never move compressed files in/archive
folder.Possible solution: https://github.com/cocowalla/serilog-sinks-file-archive/blob/d3a20bbba4282284aedd174f25f296ddac097af8/src/Serilog.Sinks.File.Archive/ArchiveHooks.cs#L50
should be
this.targetDirectory = targetDirectory;