logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: Joran, RollingFileAppender, and Rollover failure warnings
Date Wed, 08 Dec 2004 05:48:31 GMT
At 08:29 PM 12/7/2004 +0100, you wrote:
 >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
 >>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.

I guess I should have known this.  Haven't really made much use of the 
rolling appenders up to now as you can tell.

 >>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 
 >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?

Well, it proves to me that I don't understand what a sliding window rolling 
policy is.  However, my understanding of it is a bit beside the point.  You 
have my configuration and I think you said it looked ok to you.  You have 
the full log file and then partial stack trace that I posted later showing 
the details where the logging just reported the rollover failure.  There is 
obviously a problem if my config is correct but I get these rolling 
exceptions with Log4j saying it can't find a file it is looking for.  You 
do agree that there is a problem, right?  I'm hoping what I've provided 
will help track it down because I'm just not sure I understand what sliding 
window the code is doing?  Should I even be using this appender for my 
config?  Can you give me an example that will work for the localhost 
appender that does what I want without using the sliding window rolling 
policy?  To be honest, I'm just using it because I saw it in an 
example.  There isn't much documentation around this stuff yet.


 >Ceki Gülcü
 >  The complete log4j manual:  http://qos.ch/log4j/
 >To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
 >For additional commands, e-mail: log4j-dev-help@logging.apache.org

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message