I'm using NLog for logging and need to zip the loads of rotated text files it's generating shortly after they are created.
NLog should support this feature some time in the unknown future, but is there a utility of sorts that can do this independently ?
Zipping archive files is supported since NLog 4.0, see news post
Use enableArchiveFileCompression
, e.g.
<target name="file" xsi:type="File"
layout="${longdate} ${logger} ${message}"
fileName="${basedir}/logs/logfile.txt"
archiveFileName="${basedir}/archives/log.{#}.txt"
archiveEvery="Day"
archiveNumbering="Rolling"
maxArchiveFiles="7"
enableArchiveFileCompression="true" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With