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

noreply.ceki at qos.ch noreply.ceki at qos.ch
Fri May 11 19:42:14 CEST 2007


Author: ceki
Date: Fri May 11 19:42:13 2007
New Revision: 1532

Added:
   logback/trunk/logback-core/src/main/java/ch/qos/logback/core/LogbackException.java
Modified:
   logback/trunk/logback-core/src/main/java/ch/qos/logback/core/Appender.java

Log:

- Added LogbackException (extending RuntimeException) 
- Added a throws "LogbackException" to Appender.doAppend method 

These changes allow "transactional" logback modules, e.g. logback-audit to 
throw exceptions. Other best-effort modules may catch LogbackExceptios effectively
hiding them from the user.

Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/Appender.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/Appender.java	(original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/Appender.java	Fri May 11 19:42:13 2007
@@ -26,7 +26,7 @@
    * is of type Object.
    * @param event
    */
-  void doAppend(E event);
+  void doAppend(E event) throws LogbackException;
 
   /**
    * Set the {@link Layout} for this appender.

Added: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/LogbackException.java
==============================================================================
--- (empty file)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/LogbackException.java	Fri May 11 19:42:13 2007
@@ -0,0 +1,16 @@
+package ch.qos.logback.core;
+
+public class LogbackException extends RuntimeException {
+
+  private static final long serialVersionUID = -799956346239073266L;
+
+  public LogbackException(String msg) {
+    super(msg);
+  }
+  
+  
+  public LogbackException(String msg, Throwable nested) {
+    super(msg, nested);
+  }
+  
+}



More information about the logback-dev mailing list