I am trying to zip and archive the old logs. I used the below target for this purpose.
<target name="PluginError" xsi:type="File"
layout="${longdate}${message}${exception:format=tostring}"
fileName="${basedir}/logs/Plugin/Error/${date:format=yyyy-MM-dd}.log"
archiveAboveSize="2000000"
archiveNumbering="Rolling"
maxArchiveFiles="10"
archiveFileName="${basedir}/logs/Plugin/Error/log.{#}.txt"
archiveEvery="Day"
enableArchiveFileCompression="true"/>
But this deletes the old log files when count passes 3 instead of zipping them and archiving them. I am using NLog dll version 4.4.4090.0. What am I doing wrong here? Any help would be much appreciated.