Testing using C# code in simple EXE, running under my windows identity, I am an admin on the local machine:
LogFactory lf = new LogFactory();
Logger lg = lf.GetCurrentClassLogger();
lg.Log(LogLevel.Info, @"Some Logging Test Message Text");
When first running, if the log file "log.txt" in the target directory does not exist, it is created, and log messages are written to it. This works until the date changes. Once the date changes, I expect that the existing log will be placed into the archive directory with the name "log.0.txt", or "log.1.txt", etc., and a new log.txt file will be started with new date's messages.
However, nothing is happening at all. The archive directory does not get created, no archive files are created, nothing gets written to any log file any longer and no exceptions are thrown. If I manually make a change in the existing log file so that it's last date modified now reads as the current date, the log messages start getting written to the file again, but still no archive.
I would appreciate any thoughts or help anyone can provide on this.
I had the same issue, and someone gave me that solution, and it resolved my problem.
I do not recall seeing that in the documentation anywhere, but apparently that is the way it works--the code needs a placeholder in the archivefilename to determine where to put the correct archive file number.