Closed alex-y-su closed 8 years ago
Was there ever any movement on this feature? I would like to see this incorporated.
+1 fileName as a parameter. Is there a way to do this today?
I also think retainedFileCountLimit is very useful for limiting the whole log file size.
Was there ever any movement on this feature?
I found it on a comment by ewilansky on a pull request. https://github.com/BedeGaming/sinks-rollingfile/pull/17
But the pull request itself isn't merged yet. If somebody added the function, I think it's not taken to the repository soon.
Apologies for not getting to this sooner.
As of 2.0.6 RetainedFileCount is now available and it based (roughly) of the original RollingFileSink. The default value is set as null
which keeps the functionality as is (no files get deleted on roll over).
That's great news. Thanks Andy!
Thanks a lot! I implemented a thread to delete log files by number, but now it's garbage :) I replace it with a new library.
Hello, can you please add "retainedFileCountLimit" parameter as in original RollingFile sink? This parameter may be useful when I we wean log folder don't exceed some known value like 100MB, so my setup code could looks like config.WriteTo.RollingFileAlternate( fileName, fileSizeLimitBytes: 2097152, retainedFileCountLimit: 50);