[logback-dev] svn commit: r2374 - logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling

noreply.ceki at qos.ch noreply.ceki at qos.ch
Thu Jul 23 22:43:55 CEST 2009


Author: ceki
Date: Thu Jul 23 22:43:55 2009
New Revision: 2374

Modified:
   logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/RollingFileAppender.java

Log:
make append mode mandatory for RollingFileAppender

Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/RollingFileAppender.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/RollingFileAppender.java	(original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/RollingFileAppender.java	Thu Jul 23 22:43:55 2009
@@ -45,7 +45,13 @@
       addWarn("For more information, please visit http://logback.qos.ch/codes.html#rfa_no_tp");
       return;
     }
-
+    
+    // we don't want to void existing log files
+    if(!append) {
+      addWarn("Append mode is mandatory for RollingFileAppender");  
+      append = true;
+    }
+    
     if (rollingPolicy == null) {
       addError("No RollingPolicy was set for the RollingFileAppender named "
           + getName());


More information about the logback-dev mailing list