Hello all,
I have a question about the RotationAtTimeStrategy. For instance, I start my application at 11:00, and let it run until 17:00. At this time, I stop it, and it won't run until tomorrow. Then, I restart my application at 10:00, and I have a bad surprise: the log file isn't rotated, the same as yesterday is used !

I'm curious, so I went to find the code responsible for that behavior. Then, I found:

The next rollover is set at "tomorrow",00:00! So it will never rotate my file if I stop my application before!
How can I force the logger to rotate my files every day at midnight or if it is not already done (because the application was off)? Is there another strategy or may I create another strategy class?

> How can I force the logger to rotate my files every day at midnight or if it is not already done (because the application was off)? Is there another strategy or may I create another strategy class?

What you can do is add the check for the pFile->creationDate() prior to calling getNextRollover() from mustRotate() and return true if the new file should be created.
It would be nice if you could do it in a universal way (covering all the possible time based rotation cases) and contribute the code back.

Alex

P.S. I'm not sure what side-effects this may produce related to the funny NTFS "optimization" described in LogFile_WIN32.cpp constructor comment.

I have another problem, but it would probably be easy to patch. When a file is rotated, it must be destroyed then recreated. Indeed, the roll over will occur every time once the delay is over, resulting in too many archives.

> I have another problem, but it would probably be easy to patch. When a file is rotated, it must be destroyed then recreated. Indeed, the roll over will occur every time once the delay is over, resulting in too many archives.