You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have configuration with two log files (debug and brief). I have configured archiveHook with different parameters for each one (300days and 1000days). They are written to the same directory.
public static class SerilogHooks
{
public static ArchiveHooks CompressArchiveHook => new ArchiveHooks(1000, CompressionLevel.Optimal);
public static ArchiveHooks CompressArchive300Hook => new ArchiveHooks(300, CompressionLevel.Optimal);
//....
}
Expected:
ArchiveHook deletes files in each group (by name pattern) based on theirs hook settings (number of retainedFiles)
Actual:
ArchiveHook deletes all files in log directory, so all files from one log (which is first in name sort) are deleted.
The text was updated successfully, but these errors were encountered:
sommcz
changed the title
Wrong file retention with multiple logs in one dir
Wrong file retention with multiple logs in the same dir
Nov 24, 2024
sommcz
added a commit
to sommcz/serilog-sinks-file-archive
that referenced
this issue
Nov 25, 2024
I have configuration with two log files (debug and brief). I have configured archiveHook with different parameters for each one (300days and 1000days). They are written to the same directory.
Expected:
ArchiveHook deletes files in each group (by name pattern) based on theirs hook settings (number of retainedFiles)
Actual:
ArchiveHook deletes all files in log directory, so all files from one log (which is first in name sort) are deleted.
The text was updated successfully, but these errors were encountered: