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

noreply.ceki at qos.ch noreply.ceki at qos.ch
Wed Jul 8 15:09:12 CEST 2009


Author: ceki
Date: Wed Jul  8 15:09:11 2009
New Revision: 2329

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

Log:
having the rollover() method in RollingFileAppender synchronized have the tests passing 

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	Wed Jul  8 15:09:11 2009
@@ -98,7 +98,7 @@
    * <code>File</code> is truncated with no backup files created.
    * 
    */
-  public void rollover() {
+  public synchronized void rollover() {
     // Note: synchronization at this point is unnecessary as the doAppend
     // is already synched
 

Modified: logback/trunk/logback-core/src/test/java/ch/qos/logback/core/rolling/MultiThreadedRollingTest.java
==============================================================================
--- logback/trunk/logback-core/src/test/java/ch/qos/logback/core/rolling/MultiThreadedRollingTest.java	(original)
+++ logback/trunk/logback-core/src/test/java/ch/qos/logback/core/rolling/MultiThreadedRollingTest.java	Wed Jul  8 15:09:11 2009
@@ -21,8 +21,8 @@
 
 public class MultiThreadedRollingTest {
 
-  final static int NUM_THREADS = 5;
-  final static int TOTAL_DURATION = 2000;
+  final static int NUM_THREADS = 10;
+  final static int TOTAL_DURATION = 4000;
   
   Layout<Object> layout;
   Context context = new ContextBase();


More information about the logback-dev mailing list