At 08:30 AM 12/4/2004, Jacob Kjome wrote:

I'm not completely clear on what should be happening, but it seems to me that...

1. The rolling shouldn't be happening every time I restart the server. I'm using a size based triggering policy with size set to 1000. That's kbytes, not bytes, right? This code should simply not be being called until the active file hits 1000 kbytes, right?

No, it's bytes. For KB, you have to write

 <param name="maxFileSize" value="1000KB"/>
 or
 <param name="maxFileSize" value="1MB"/>

See page 102 of the complete manual.

[cut]

2. The stack trace shows Util.rename(String from, String to) looking for the "from" file as "logs/localhost.log.6". I don't know why this should be since the activeFileName is set to localhost.log, which is what I would have expected the "from" file to be named. It seems to me that SlidingWindowRollingPolicy.rollover() is doing the wrong thing to figure out the active file and, thus, sending the wrong parameters to Util.rename().

Thoughts?

The window slides to the left. If N is the last item in the windows, file.N is deleted, file.N-1 is renamed to file.N, file.N-2 to file.N-1, ..., file.1 to file.2 and the previous active file renamed to file.1


Does that help at all?

--
Ceki G�lc�

The complete log4j manual: http://qos.ch/log4j/



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to