On Apr 17, 2007, at 11:15 AM, Marshall Powers wrote:

I tried running the unit tests, as you suggested, and they appeared to work fine. For kicks, I tried reducing the max file size of my SizeBasedTriggeringPolicy to 100 bytes, as in the test case. What I saw was when my application started, it quickly generated several log files of 100 bytes like foo.0.log, foo.1.log, etc, but at some point the TriggeringPolicy stopped working, leaving me with a foo. 0.log file of about 50kb and growing. Do you think this confirms the weird file-size reporting problem you were talking about before?

Thanks,

Marshall


Doesn't sound like the file-size reporting problem or it wouldn't hit the byte counts. I'm guessing that the triggering policy is still requesting rollovers, it is just that the FixedWindowRollingPolicy is failing to delete the oldest log file and is abandoning the attempted rollover. The number of retained rollovered files is 7 (with an max of 12) once those are filled up, the oldest is deleted (line 233 of fixedwindowrollingpolicy) so the rest can be renamed. In your experiment did you get 7 rollovered files? Are you able to delete the oldest? I don't think there is a unit test that checks the behavior once you start hitting the max number of files (I'll have to check).



Reply via email to