You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ca...@apache.org on 2006/08/01 21:17:57 UTC

svn commit: r427682 - /logging/log4j/trunk/src/java/org/apache/log4j/RollingFileAppender.java

Author: carnold
Date: Tue Aug  1 12:17:56 2006
New Revision: 427682

URL: http://svn.apache.org/viewvc?rev=427682&view=rev
Log:
Bug 31003: RollingFileAppender, if removed, can cause null pointer exceptions

Modified:
    logging/log4j/trunk/src/java/org/apache/log4j/RollingFileAppender.java

Modified: logging/log4j/trunk/src/java/org/apache/log4j/RollingFileAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/java/org/apache/log4j/RollingFileAppender.java?rev=427682&r1=427681&r2=427682&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/RollingFileAppender.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/RollingFileAppender.java Tue Aug  1 12:17:56 2006
@@ -120,7 +120,9 @@
     File target;
     File file;
 
-    LogLog.debug("rolling over count=" + ((CountingQuietWriter) qw).getCount());
+    if (qw != null) {
+    	LogLog.debug("rolling over count=" + ((CountingQuietWriter) qw).getCount());
+    }
     LogLog.debug("maxBackupIndex="+maxBackupIndex);
 
     // If maxBackups <= 0, then there is no file renaming to be done.



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