You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Dan Schlossberg <da...@yahoo.com> on 2006/07/27 20:27:00 UTC

RollingFileAppender not rolling over in Tomcat and not reporting error.

Hi, I've got an interesting problem.  I'm using the RollingFileAppender in a tomcat app and it works fine the first time, but if I redeploy the app it stops rolling over.  This is probably a tomcat bug but log4j fails to report error.  I've got log4j.debug=true and it doesn't report a problem.  I've debugged into the log4j code and think I've found the problem of why its not reporting a failure.

line 148 of RollingFileAppender:
      file.renameTo(target);

This is a boolean function and its returning false (success returns true) but its not checking the return value.  The function ends up calling a function in Win32FileSystem.Class which calls a native function "rename0".  So this call is failing.  How do I figure out why it is failing?

Here is my environment
Log4j: 1.2.12
Apache Tomcat:  5.0.18
JVM: 1.5.0_06-b05
OS:  Windows XP 5.1

Also, should this be reported as a bug?

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