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

noreply.ceki at qos.ch noreply.ceki at qos.ch
Fri Nov 17 11:02:48 CET 2006


Author: ceki
Date: Fri Nov 17 11:02:48 2006
New Revision: 930

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

Log:
- indentation changes in AppenderAttachableImpl

Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/AppenderBase.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/AppenderBase.java	(original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/AppenderBase.java	Fri Nov 17 11:02:48 2006
@@ -47,8 +47,11 @@
   }
 
   private int statusRepeatCount = 0;
-  static final int ALLOWED_REPEATS = 3;
+  private int exceptionCount = 0;
+  
+  static final int ALLOWED_REPEATS = 5;
 
+  
   public synchronized void doAppend(Object eventObject) {
     // WARNING: The guard check MUST be the first statement in the
     // doAppend() method.
@@ -77,7 +80,11 @@
       // ok, we now invoke derived class' implementation of append
       this.append(eventObject);
 
-    } finally {
+    } catch(Exception e) {
+      if (exceptionCount++ < ALLOWED_REPEATS) {
+        addError("Appender ["+name+"] failed to append.", e);
+      }
+    }  finally {
       guard = false;
     }
   }



More information about the logback-dev mailing list