dfacto-lab / serilog-sinks-file

Serilog file sinks duplicated for file rolling
Apache License 2.0
14 stars 9 forks source link

Wrong file rolling sequence number when preserving filename #2

Closed numito closed 3 years ago

numito commented 3 years ago

After two runs, when log.txt and log_001.txt both exist and are 1039 bytes each, it refuses to log with exception: System.IO.IOException: 'Cannot create a file when that file already exists.

see issue https://github.com/serilog/serilog-sinks-file/issues/40#issuecomment-638169245