Closed adoris123 closed 4 years ago
Hmm, so, I'm not sure if that's going to be possible using FileLifecycleHooks.
There are 2 ways in which you can do compression:
This plugin implements the first one, as FileLifecycleHooks
enables wrapping the original stream. You can find some discussion about this over in this issue.
Just a note to say there is now also another plugin available, serilog-sinks-file-archive. It doesn't work quite how you describe, but it is similar.
As files drop out of retention, Serilog's rolling file mechanism usually deletes them, but this serilog-sinks-file-archive
lets you archive them instead (copy and/or compress).
It will be nice if only old files are gzipped and current log files leaves as is, unzipped. As option for existing functionality. Thanks for super plugin!