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...
Comarch Software AG;
Chemnitzer Str. 50; 01187
Tel.: +49 351 4389 700; Fax: +49 351 4389
Registriert beim Amtsgericht Dresden HRB
Vorstand: Anna Filipiak; Vorsitz: Katharina Bania,
Aufsichtsrat: Janusz Filipiak; Vorsitz: Rafal
Chwast, Pawel Przewiezlikowski
On Apr 17, 2007, at 11:15 AM, Marshall Powers wrote:
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?
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).