how does nlog clear historical files code example

Example 1: how does nlog clear historical files

<target name="file"
            xsi:type="File"
            fileName="${basedir}/logs/Log.${level}.current.txt"
            layout="${longdate} ${callsite} ${level}: ${message} ${exception:format=Message,StackTrace} ${stacktrace}"
            archiveFileName="${basedir}/logs/archives/log.error.${shortdate}.{#}.txt"
            archiveAboveSize="5242880"
            archiveEvery="Day"
            archiveNumbering = "Rolling"
            maxArchiveFiles="3" />

Example 2: how does nlog clear historical files

<target name="file" xsi:type="File"
        fileName="${basedir}/logs/Log.${level}.${shortdate}.txt"
        archiveAboveSize="5242880"
        maxArchiveFiles="3" />

Tags:

Misc Example