-
Notifications
You must be signed in to change notification settings - Fork 130
Open
Labels
Description
Description
If a file name contains multiple dots, the rolling is added before the last dot instead of the first one.
Reproduction
- Add a configuration with
.File("MyFile.ext1.ext2", fileSizeLimitBytes: 1, rollOnFileSizeLimit: true, retainedFileCountLimit: 10) - Add two log entries (doesn't matter)
- See two files like
MyFile.ext1.ext2andMyFile.ext1_001.ext2
Expected behavior
- See two files like
MyFile.ext1.ext2andMyFile_001.ext1.ext2
Relevant package, tooling and runtime versions
Serilog.Sinks.File 6.0.1
Additional context
We added GZip hook and changed the file extension to .clef.gz and therefore we now have .clef_xxx.gz files, which our tooling is not fine with. Technically this is correct and the default behavior of Path.GetExtension, but it would be great to have it configurable (directory + file name + file extension) as the PathRoller already does internally support it.