I would like to be able to archive logs on a 2 minute interval instead of a 1 minute, is this possible with the target NLog.config structure?
Poking around, I have set the following options:
archiveEvery="Minute" maxArchiveFiles="5"
Looking for a parameter or a way of doing archiveEvery="2minutes"
FileArchivePeriod
has a limited number of options.These all have a related
formatString
that theFileTarget
class uses as a simple greater than comparison mechanism to see if a new file should be created.So while you could definitely customize the code to meet your requirement, it won't do it out of the box (and the simple change would be kind of ugly, IMO).