FileTarget: Continuous archiving when using date-archive
It seems that pull request #1100 introduced a rather serious bug that evaded the unit tests.
When using FileTarget with date-archiving (config below), logging works fine until the log is archived for the first time. Afterwards, the log file is archived after every single message. This causes the log file to contain only one log at any given time.
FileTarget config:
<target name="logDaily" xsi:type="File"
layout="${longdate} - ${level:uppercase=true}: ${message}"
fileName="C:\temp\log.txt"
archiveFileName="C:\temp\log.{#}.txt"
archiveEvery="Day"
archiveNumbering="Date"
maxArchiveFiles="10"
concurrentWrites="true"
keepFileOpen="true"
encoding="UTF-8" />