Problem with archiving mechanism creating multiple files

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Problem with archiving mechanism creating multiple files


I have observed a problem with the archive feature in NLog for file targets.  I have multiple processes logging to the same file on a SAN drive.  I have the file target configured to archive every day.  Sometimes at midnight, multiple archives are created, presumably by the multiple processed trying to write a log entry right around midnight (or shortly thereafter).

I have tried tweaking the various parameters for the file, but to no avail.  If anyone has any suggestions, they would be welcome.

I have now abandoned the archiving feature of NLog and have opted for using the convention of having the processes write to the file with the short date embedded in the filename.  I will take care of the file purging independently.