Utility for compressing files with a modified log?

I use NLog for logging and you need to zip up a ton of files with rotating text files that it generates shortly after they are created.

NLog should support this feature for a while in the unknown future, but is there a sort utility that can do this on its own?

+5
source share
1 answer

ZIP archives supported with NLog 4.0, see news post

Use enableArchiveFileCompressionfor example

<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" />
+1
source

All Articles