Hi,
 
concerning this limit of 7 and max of 12 rollovered files, is there a special reason for it ? If we need to keep more than 12 files, should we modify the code by ourself ? It seems strange to me that there is a hardcoded limit, so there may be a reason I'm not aware of...
 
Thanks,
Matthieu
 
-----------------------------------------------------
Comarch Software AG;
Chemnitzer Str. 50; 01187 Dresden
Tel.: +49 351 4389 700; Fax: +49 351 4389 710
Registriert beim Amtsgericht Dresden HRB 23838
Vorstand: Anna Filipiak; Vorsitz: Katharina Bania, Tomasz Brodziak
Aufsichtsrat: Janusz Filipiak; Vorsitz: Rafal Chwast, Pawel Przewiezlikowski
 


Od: Curt Arnold [mailto:carnold@apache.org]
Wysłano: 17 kwietnia 2007 19:36
Do: Log4CXX User
Temat: Re: rollingfileappender ... not rolling?


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).