logback-dev
Threads by month
- ----- 2025 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
December 2006
- 5 participants
- 132 discussions

svn commit: r1086 - in logback/trunk/log4j-bridge/compatibility: . lib src src/main src/main/java src/main/java/test target
by noreply.seb@qos.ch 15 Dec '06
by noreply.seb@qos.ch 15 Dec '06
15 Dec '06
Author: seb
Date: Fri Dec 15 14:12:39 2006
New Revision: 1086
Added:
logback/trunk/log4j-bridge/compatibility/
logback/trunk/log4j-bridge/compatibility/build.xml
logback/trunk/log4j-bridge/compatibility/lib/
logback/trunk/log4j-bridge/compatibility/lib/junit-3.8.1.jar (contents, props changed)
logback/trunk/log4j-bridge/compatibility/lib/log4j-1.2.14.jar (contents, props changed)
logback/trunk/log4j-bridge/compatibility/lib/log4j-1.3alpha-8.jar (contents, props changed)
logback/trunk/log4j-bridge/compatibility/lib/log4j-bridge-0.7-SNAPSHOT.jar (contents, props changed)
logback/trunk/log4j-bridge/compatibility/lib/logback-classic-0.7-SNAPSHOT.jar (contents, props changed)
logback/trunk/log4j-bridge/compatibility/lib/logback-core-0.7-SNAPSHOT.jar (contents, props changed)
logback/trunk/log4j-bridge/compatibility/lib/slf4j-api-1.1.0-RC1.jar (contents, props changed)
logback/trunk/log4j-bridge/compatibility/src/
logback/trunk/log4j-bridge/compatibility/src/main/
logback/trunk/log4j-bridge/compatibility/src/main/java/
logback/trunk/log4j-bridge/compatibility/src/main/java/test/
logback/trunk/log4j-bridge/compatibility/src/main/java/test/Log4j12Calls.java
logback/trunk/log4j-bridge/compatibility/src/main/java/test/Log4j13Calls.java
logback/trunk/log4j-bridge/compatibility/target/ (props changed)
Log:
Added the log4j compatibility test in the log4j-bridge module
Added: logback/trunk/log4j-bridge/compatibility/build.xml
==============================================================================
--- (empty file)
+++ logback/trunk/log4j-bridge/compatibility/build.xml Fri Dec 15 14:12:39 2006
@@ -0,0 +1,100 @@
+<project name="testing-log4j-bridge" default="usage" basedir=".">
+
+ <property name="source.home" value="./src/main/java/" />
+ <property name="javac.dest.12" value="./target/classes12/" />
+ <property name="javac.dest.13" value="./target/classes13/" />
+ <property name="lib" value="./lib" />
+
+ <property name="version" value="1.0" />
+ <property name="deprecation" value="on" />
+
+ <path id="basic.classpath">
+ <pathelement location="${source.home}" />
+ <pathelement location="${lib}/junit-3.8.1.jar" />
+ </path>
+
+ <path id="log4j12.classpath">
+ <path refid="basic.classpath" />
+ <pathelement location="${javac.dest.12}" />
+ <pathelement location="${lib}/log4j-1.2.14.jar" />
+ </path>
+
+ <path id="log4j13.classpath">
+ <path refid="basic.classpath" />
+ <pathelement location="${javac.dest.13}" />
+ <pathelement location="${lib}/log4j-1.3alpha-8.jar" />
+ </path>
+
+ <path id="log4-bridge.classpath">
+ <path refid="basic.classpath" />
+ <pathelement location="${lib}/log4j-bridge-0.7-SNAPSHOT.jar" />
+ <pathelement location="${lib}/logback-classic-0.7-SNAPSHOT.jar" />
+ <pathelement location="${lib}/logback-core-0.7-SNAPSHOT.jar" />
+ <pathelement location="${lib}/slf4j-api-1.1.0-RC1.jar" />
+ </path>
+
+ <!-- ================================================================= -->
+ <!-- Default target -->
+ <!-- ================================================================= -->
+ <target name="usage">
+ <echo>
+ These are some of the targets supported by this ANT build scpript:
+
+ all - run all available tests
+
+ </echo>
+ </target>
+
+ <target name="init">
+ <mkdir dir="${javac.dest.12}" />
+ <mkdir dir="${javac.dest.13}" />
+ </target>
+
+ <target name="clean">
+ <delete>
+ <fileset dir="${javac.dest.12}" includes="**" />
+ <fileset dir="${javac.dest.13}" includes="**" />
+ </delete>
+ </target>
+
+ <target name="build_log4j12" depends="init">
+ <javac srcdir="${source.home}"
+ destdir="${javac.dest.12}"
+ includes="**/Log4j12Calls.java"
+ deprecation="${deprecation}" debug="on">
+ <classpath refid="log4j12.classpath" />
+ </javac>
+ </target>
+
+ <target name="build_log4j13" depends="init">
+ <javac srcdir="${source.home}"
+ destdir="${javac.dest.13}"
+ includes="**/Log4j13Calls.java" deprecation="${deprecation}" debug="on">
+ <classpath refid="log4j13.classpath" />
+ </javac>
+ </target>
+
+ <!-- ================================================================= -->
+ <!-- Run tests -->
+ <!-- ================================================================= -->
+ <target name="all" depends="test1, test2" />
+
+ <target name="test1" depends="build_log4j12">
+ <junit printsummary="yes" fork="yes" haltonfailure="yes">
+ <classpath refid="log4-bridge.classpath" />
+ <classpath location="${javac.dest.12}" />
+ <formatter type="plain" usefile="false" />
+ <test name="test.Log4j12Calls" />
+ </junit>
+ </target>
+
+ <target name="test2" depends="build_log4j13">
+ <junit printsummary="yes" fork="yes" haltonfailure="yes">
+ <classpath refid="log4-bridge.classpath" />
+ <classpath location="${javac.dest.13}" />
+ <formatter type="plain" usefile="false" />
+ <test name="test.Log4j13Calls" />
+ </junit>
+ </target>
+
+</project>
Added: logback/trunk/log4j-bridge/compatibility/lib/junit-3.8.1.jar
==============================================================================
Binary file. No diff available.
Added: logback/trunk/log4j-bridge/compatibility/lib/log4j-1.2.14.jar
==============================================================================
Binary file. No diff available.
Added: logback/trunk/log4j-bridge/compatibility/lib/log4j-1.3alpha-8.jar
==============================================================================
Binary file. No diff available.
Added: logback/trunk/log4j-bridge/compatibility/lib/log4j-bridge-0.7-SNAPSHOT.jar
==============================================================================
Binary file. No diff available.
Added: logback/trunk/log4j-bridge/compatibility/lib/logback-classic-0.7-SNAPSHOT.jar
==============================================================================
Binary file. No diff available.
Added: logback/trunk/log4j-bridge/compatibility/lib/logback-core-0.7-SNAPSHOT.jar
==============================================================================
Binary file. No diff available.
Added: logback/trunk/log4j-bridge/compatibility/lib/slf4j-api-1.1.0-RC1.jar
==============================================================================
Binary file. No diff available.
Added: logback/trunk/log4j-bridge/compatibility/src/main/java/test/Log4j12Calls.java
==============================================================================
--- (empty file)
+++ logback/trunk/log4j-bridge/compatibility/src/main/java/test/Log4j12Calls.java Fri Dec 15 14:12:39 2006
@@ -0,0 +1,22 @@
+package test;
+
+import junit.framework.TestCase;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.MDC;
+
+public class Log4j12Calls extends TestCase {
+ public static final Logger logger = Logger.getLogger(Log4j12Calls.class);
+
+ public void testLog() {
+ MDC.put("key", "value1");
+
+ logger.debug("Entering application");
+ logger.info("Violets are blue");
+ logger.warn("Here is a warning");
+
+ logger.error("Exiting application", new Exception("just testing"));
+
+ MDC.remove("key");
+ }
+}
Added: logback/trunk/log4j-bridge/compatibility/src/main/java/test/Log4j13Calls.java
==============================================================================
--- (empty file)
+++ logback/trunk/log4j-bridge/compatibility/src/main/java/test/Log4j13Calls.java Fri Dec 15 14:12:39 2006
@@ -0,0 +1,26 @@
+package test;
+
+import junit.framework.TestCase;
+
+import org.apache.log4j.Logger;
+import org.apache.log4j.MDC;
+
+public class Log4j13Calls extends TestCase {
+ public static final Logger logger = Logger.getLogger(Log4j12Calls.class);
+
+ public void testLog() {
+ MDC.put("key", "value1");
+
+ logger.debug("Entering application");
+ logger.info("Violets are blue");
+ logger.warn("Here is a warning");
+ logger.info("The answer is {}.", new Integer(42));
+ logger.info("Number: {} and another one: {}.", new Integer(42), new Integer(24));
+
+ logger.error("Exiting application", new Exception("just testing"));
+
+ MDC.remove("key");
+
+ MDC.clear();
+ }
+}
1
0

svn commit: r1085 - logback/trunk/logback-core/src/main/java/ch/qos/logback/core/util
by noreply.seb@qos.ch 15 Dec '06
by noreply.seb@qos.ch 15 Dec '06
15 Dec '06
Author: seb
Date: Fri Dec 15 13:54:49 2006
New Revision: 1085
Added:
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/util/DynamicClassLoadingException.java
Modified:
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/util/OptionHelper.java
Log:
Better behaviour in case of NoClassDefFoundError
Added: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/util/DynamicClassLoadingException.java
==============================================================================
--- (empty file)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/util/DynamicClassLoadingException.java Fri Dec 15 13:54:49 2006
@@ -0,0 +1,10 @@
+package ch.qos.logback.core.util;
+
+public class DynamicClassLoadingException extends Exception {
+
+ private static final long serialVersionUID = 4962278449162476114L;
+
+ public DynamicClassLoadingException(String desc, Throwable root ) {
+ super(desc, root);
+ }
+}
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/util/OptionHelper.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/util/OptionHelper.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/util/OptionHelper.java Fri Dec 15 13:54:49 2006
@@ -13,7 +13,6 @@
import ch.qos.logback.core.CoreGlobal;
-
/**
* @author Ceki Gulcu
*/
@@ -21,25 +20,31 @@
@SuppressWarnings("unchecked")
public static Object instantiateByClassName(String className, Class superClass)
- throws ClassNotFoundException, IncompatibleClassException,
- InstantiationException, IllegalAccessException {
+ throws IncompatibleClassException, DynamicClassLoadingException {
+
if (className == null) {
throw new NullPointerException();
}
-
- // FIXME This is temporary (really!).
- Class classObj = null;
+
try {
- classObj = Class.forName(className);
- } catch(ClassNotFoundException e) {
- ClassLoader cccl = Thread.currentThread().getContextClassLoader();
- classObj = cccl.loadClass(className);
- }
-
- if (!superClass.isAssignableFrom(classObj)) {
- throw new IncompatibleClassException(superClass, classObj);
+ // FIXME This is temporary (really!).
+ Class classObj = null;
+ try {
+ classObj = Class.forName(className);
+ } catch (ClassNotFoundException e) {
+ ClassLoader cccl = Thread.currentThread().getContextClassLoader();
+ classObj = cccl.loadClass(className);
+ }
+
+ if (!superClass.isAssignableFrom(classObj)) {
+ throw new IncompatibleClassException(superClass, classObj);
+ }
+ return classObj.newInstance();
+ } catch (IncompatibleClassException ice) {
+ throw ice;
+ } catch (Throwable t) {
+ throw new DynamicClassLoadingException("Failed to instantiate type "+className, t);
}
- return classObj.newInstance();
}
/**
@@ -47,28 +52,28 @@
* Then perform variable substitution on the found value.
*
*/
-// public static String findAndSubst(String key, Properties props) {
-// String value = props.getProperty(key);
-//
-// if (value == null) {
-// return null;
-// }
-//
-// try {
-// return substVars(value, props);
-// } catch (IllegalArgumentException e) {
-// return value;
-// }
-// }
-
+ // public static String findAndSubst(String key, Properties props) {
+ // String value = props.getProperty(key);
+ //
+ // if (value == null) {
+ // return null;
+ // }
+ //
+ // try {
+ // return substVars(value, props);
+ // } catch (IllegalArgumentException e) {
+ // return value;
+ // }
+ // }
final static String DELIM_START = "${";
final static char DELIM_STOP = '}';
final static int DELIM_START_LEN = 2;
final static int DELIM_STOP_LEN = 1;
+
/**
* Perform variable substitution in string <code>val</code> from the values
- * of keys found the primary map passed as first parameter, then in the secondary
- * map, and last in the system properties.
+ * of keys found the primary map passed as first parameter, then in the
+ * secondary map, and last in the system properties.
*
* <p>
* The variable substitution delimeters are <b>${</b> and <b>}</b>.
@@ -78,22 +83,24 @@
* "value1", then the call
*
* <pre>
- * String s = OptionConverter.substituteVars("Value of key is ${key1}.", priMap, null);
+ * String s = OptionConverter.substituteVars("Value of key is ${key1}.", priMap,
+ * null);
* </pre>
+ *
* will set the variable <code>s</code> to "Value of key is value1.".
*
* <p>
- * If no value could be found for the specified key, then the secondary map is searches,
- * and if that fails, the system properties are searched, if that fails, then
- * substitution defaults to the empty string.
+ * If no value could be found for the specified key, then the secondary map is
+ * searches, and if that fails, the system properties are searched, if that
+ * fails, then substitution defaults to the empty string.
*
* <p>
* For example, if system properties contains no value for the key
* "inexistentKey", then the call
*
* <pre>
- * String s = OptionConverter
- * .subsVars("Value of inexistentKey is [${inexistentKey}]", priMap, null);
+ * String s = OptionConverter.subsVars(
+ * "Value of inexistentKey is [${inexistentKey}]", priMap, null);
* </pre>
*
* will set <code>s</code> to "Value of inexistentKey is []".
@@ -120,7 +127,8 @@
* @throws IllegalArgumentException
* if <code>val</code> is malformed.
*/
- public static String substVars(String val, Map<String, String> primaryMap, Map<String, String> secondaryMap) {
+ public static String substVars(String val, Map<String, String> primaryMap,
+ Map<String, String> secondaryMap) {
StringBuffer sbuf = new StringBuffer();
@@ -137,7 +145,7 @@
return val;
} else { // add the tail string which contails no variables and return
- // the result.
+ // the result.
sbuf.append(val.substring(i, val.length()));
return sbuf.toString();
@@ -165,8 +173,8 @@
if (primaryMap != null) {
replacement = primaryMap.get(key);
}
-
- if(replacement == null && secondaryMap != null) {
+
+ if (replacement == null && secondaryMap != null) {
replacement = secondaryMap.get(key);
}
@@ -187,7 +195,8 @@
// where the properties are
// x1=p1
// x2=${x1}
- String recursiveReplacement = substVars(replacement, primaryMap, secondaryMap);
+ String recursiveReplacement = substVars(replacement, primaryMap,
+ secondaryMap);
sbuf.append(recursiveReplacement);
}
@@ -212,7 +221,7 @@
try {
return System.getProperty(key, def);
} catch (Throwable e) { // MS-Java throws
- // com.ms.security.SecurityExceptionEx
+ // com.ms.security.SecurityExceptionEx
return def;
}
}
@@ -227,7 +236,7 @@
}
return result;
}
-
+
/**
* If <code>value</code> is "true", then <code>true</code> is returned. If
* <code>value</code> is "false", then <code>true</code> is returned.
1
0

svn commit: r1084 - logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db
by noreply.seb@qos.ch 14 Dec '06
by noreply.seb@qos.ch 14 Dec '06
14 Dec '06
Author: seb
Date: Thu Dec 14 18:44:37 2006
New Revision: 1084
Modified:
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/ConnectionSource.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/DataSourceConnectionSource.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/DriverManagerConnectionSource.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/JNDIConnectionSource.java
Log:
javadoc update
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/ConnectionSource.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/ConnectionSource.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/ConnectionSource.java Thu Dec 14 18:44:37 2006
@@ -19,6 +19,9 @@
* The <id>ConnectionSource</id> interface provides a pluggable means of
* transparently obtaining JDBC {@link java.sql.Connection}s for logback classes
* that require the use of a {@link java.sql.Connection}.
+ *
+ * For more informations about this component, please refer to the online manual at
+ * http://logback.qos.ch/manual/appenders.html#DBAppender
*
* @author <a href="mailto:rdecampo@twcny.rr.com">Ray DeCampo</a>
*/
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/DataSourceConnectionSource.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/DataSourceConnectionSource.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/DataSourceConnectionSource.java Thu Dec 14 18:44:37 2006
@@ -21,6 +21,9 @@
* manner based on a {@link javax.sql.DataSource DataSource}.
* <p>
*
+ * For more informations about this component, please refer to the online manual at
+ * http://logback.qos.ch/manual/appenders.html#DBAppender
+ *
* @author Ray DeCampo
* @author Ceki Gülcü
*/
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/DriverManagerConnectionSource.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/DriverManagerConnectionSource.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/DriverManagerConnectionSource.java Thu Dec 14 18:44:37 2006
@@ -19,45 +19,8 @@
* {@link ConnectionSource} that obtains the Connection in the traditional JDBC
* manner based on the connection URL.
* <p>
- * Note that this class will establish a new Connection for each call to
- * {@link #getConnection()}. It is recommended that you either use a JDBC
- * driver that natively supported Connection pooling or that you create your own
- * implementation of {@link ConnectionSource} that taps into whatever pooling
- * mechanism you are already using. (If you have access to a JNDI implementation
- * that supports {@link javax.sql.DataSource}s, e.g. within a J2EE application
- * server, see {@link JNDIConnectionSource}). See <a href="#dbcp">below</a>
- * for a configuration example that uses the <a
- * href="http://jakarta.apache.org/commons/dbcp/index.html">commons-dbcp</a>
- * package from Apache.
- * <p>
- * Sample configuration:<br>
- *
- * <pre>
- * <connectionSource class="org.apache.log4j.jdbc.DriverManagerConnectionSource">
- * <param name="driver" value="com.mysql.jdbc.Driver" />
- * <param name="url" value="jdbc:mysql://localhost:3306/mydb" />
- * <param name="username" value="myUser" />
- * <param name="password" value="myPassword" />
- * </connectionSource>
- * </pre>
- *
- * <p>
- * <a name="dbcp">If</a> you do not have another connection pooling mechanism
- * built into your application, you can use the <a
- * href="http://jakarta.apache.org/commons/dbcp/index.html">commons-dbcp</a>
- * package from Apache:<br>
- *
- * <pre>
- * <connectionSource class="org.apache.log4j.jdbc.DriverManagerConnectionSource">
- * <param name="driver" value="org.apache.commons.dbcp.PoolingDriver" />
- * <param name="url" value="jdbc:apache:commons:dbcp:/myPoolingDriver" />
- * </connectionSource>
- * </pre>
- *
- * Then the configuration information for the commons-dbcp package goes into the
- * file myPoolingDriver.jocl and is placed in the classpath. See the <a
- * href="http://jakarta.apache.org/commons/dbcp/index.html">commons-dbcp</a>
- * documentation for details.
+ * For more informations about this component, please refer to the online manual at
+ * http://logback.qos.ch/manual/appenders.html#DBAppender
*
* @author <a href="mailto:rdecampo@twcny.rr.com">Ray DeCampo</a>
*/
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/JNDIConnectionSource.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/JNDIConnectionSource.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/db/JNDIConnectionSource.java Thu Dec 14 18:44:37 2006
@@ -30,31 +30,8 @@
* of connection pooling and whatever other goodies the application server
* provides.
* <p>
- * Sample configuration:<br>
- *
- * <pre>
- * <connectionSource class="org.apache.log4j.jdbc.JNDIConnectionSource">
- * <param name="jndiLocation" value="jdbc/MySQLDS" />
- * </connectionSource>
- * </pre>
- *
- * <p>
- * Sample configuration (with username and password):<br>
- *
- * <pre>
- * <connectionSource class="org.apache.log4j.jdbc.JNDIConnectionSource">
- * <param name="jndiLocation" value="jdbc/MySQLDS" />
- * <param name="username" value="myUser" />
- * <param name="password" value="myPassword" />
- * </connectionSource>
- * </pre>
- *
- * <p>
- * Note that this class will obtain an {@link javax.naming.InitialContext} using
- * the no-argument constructor. This will usually work when executing within a
- * J2EE environment. When outside the J2EE environment, make sure that you
- * provide a jndi.properties file as described by your JNDI provider's
- * documentation.
+ * For more informations about this component, please refer to the online manual at
+ * http://logback.qos.ch/manual/appenders.html#DBAppender
*
* @author <a href="mailto:rdecampo@twcny.rr.com">Ray DeCampo</a>
*/
1
0

svn commit: r1083 - in logback/trunk: . logback-classic/src/main/java/ch/qos/logback/classic/util
by noreply.seb@qos.ch 14 Dec '06
by noreply.seb@qos.ch 14 Dec '06
14 Dec '06
Author: seb
Date: Thu Dec 14 17:41:04 2006
New Revision: 1083
Added:
logback/trunk/codeStyle.xml
Modified:
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/util/ContextInitializer.java
logback/trunk/pom.xml
Log:
Updated SLF4J version number
Added a codeStyle file (from SLF4J)
Un-commented the call to BasicConfigurator in the ContextInitializer
Added: logback/trunk/codeStyle.xml
==============================================================================
--- (empty file)
+++ logback/trunk/codeStyle.xml Thu Dec 14 17:41:04 2006
@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="10">
+<profile name="logbackCodeStyle" version="10">
+<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_comments" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="8"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
+</profile>
+</profiles>
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/util/ContextInitializer.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/util/ContextInitializer.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/util/ContextInitializer.java Thu Dec 14 17:41:04 2006
@@ -2,6 +2,7 @@
import java.net.URL;
+import ch.qos.logback.classic.BasicConfigurator;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.joran.JoranConfigurator;
import ch.qos.logback.core.joran.spi.JoranException;
@@ -37,7 +38,7 @@
StatusPrinter.print(loggerContext);
}
} else {
- // BasicConfigurator.configure(loggerContext);
+ BasicConfigurator.configure(loggerContext);
}
}
}
Modified: logback/trunk/pom.xml
==============================================================================
--- logback/trunk/pom.xml (original)
+++ logback/trunk/pom.xml Thu Dec 14 17:41:04 2006
@@ -37,7 +37,7 @@
</dependencies>
<properties>
- <slf4j.version>1.1.0-RC0</slf4j.version>
+ <slf4j.version>1.1.0-RC1</slf4j.version>
</properties>
<dependencyManagement>
@@ -86,7 +86,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <version>1.1.0-RC0</version>
+ <version>1.1.0-RC1</version>
</dependency>
<dependency>
<groupId>hsqldb</groupId>
1
0

svn commit: r1082 - logback/trunk/log4j-bridge/src/main/java/org/apache/log4j
by noreply.seb@qos.ch 13 Dec '06
by noreply.seb@qos.ch 13 Dec '06
13 Dec '06
Author: seb
Date: Wed Dec 13 21:40:54 2006
New Revision: 1082
Added:
logback/trunk/log4j-bridge/src/main/java/org/apache/log4j/MDC.java
Modified:
logback/trunk/log4j-bridge/src/main/java/org/apache/log4j/Category.java
Log:
Added a MDC wrapper and parametrized logging into Category.java
Modified: logback/trunk/log4j-bridge/src/main/java/org/apache/log4j/Category.java
==============================================================================
--- logback/trunk/log4j-bridge/src/main/java/org/apache/log4j/Category.java (original)
+++ logback/trunk/log4j-bridge/src/main/java/org/apache/log4j/Category.java Wed Dec 13 21:40:54 2006
@@ -23,16 +23,15 @@
* <p>
* This class is a minimal implementation of the origianl
* org.apache.log4j.Logger class delegating all calls to a
- * {@link org.slf4j.Logger} instance, which in turn will delegate to a final
- * logging system chosen by the user..
+ * {@link ch.qos.logback.classic.Logger} instance.
* </p>
*
* <p>
* Log4j's <code>debug()</code>, <code>info()</code>, <code>warn()</code>,
- * <code>error()</code> printing methods are directly mapped to their SLF4J
+ * <code>error()</code> printing methods are directly mapped to their logback
* equivalents. Log4j's <code>trace()</code> printing method is mapped to
- * SLF4J's <code>debug()</code> method with a TRACE marker. Log4j's
- * <code>fatal()</code> printing method is mapped to SLF4J's
+ * logback's <code>debug()</code> method with a TRACE marker. Log4j's
+ * <code>fatal()</code> printing method is mapped to logback's
* <code>error()</code> method with a FATAL marker.
*
* @author Sébastien Pennec
@@ -80,64 +79,96 @@
}
/**
- * Delegates to {@link org.slf4j.Logger#isDebugEnabled} method of the SLF4J
- * API, in addition, the call is marked with a marker named "TRACE".
+ * Delegates to {@link ch.qos.logback.classic.Logger#isDebugEnabled}
+ * method of logback, in addition, the call is marked with a marker named "TRACE".
*/
public boolean isTraceEnabled() {
return lbLogger.isDebugEnabled(TRACE_MARKER);
}
/**
- * Delegates to {@link org.slf4j.Logger#isDebugEnabled} method of the SLF4J
- * API.
+ * Delegates to {@link ch.qos.logback.classic.Logger#isDebugEnabled} method of logback
*/
public boolean isDebugEnabled() {
return lbLogger.isDebugEnabled();
}
/**
- * Delegates to {@link org.slf4j.Logger#isInfoEnabled} method of the SLF4J
- * API.
+ * Delegates to {@link ch.qos.logback.classic.Logger#isInfoEnabled} method of logback
*/
public boolean isInfoEnabled() {
return lbLogger.isInfoEnabled();
}
/**
- * Delegates to {@link org.slf4j.Logger#isWarnEnabled} method of the SLF4J
- * API.
+ * Delegates to {@link ch.qos.logback.classic.Logger#isWarnEnabled} method of logback
*/
public boolean isWarnEnabled() {
return lbLogger.isWarnEnabled();
}
+
+ public boolean isEnabledFor(Priority p) {
+ return isEnabledFor(Level.toLevel(p.level));
+ }
+
+ public boolean isEnabledFor(Level l) {
+ switch (l.level) {
+ case Level.DEBUG_INT:
+ return lbLogger.isDebugEnabled();
+ case Level.INFO_INT:
+ return lbLogger.isInfoEnabled();
+ case Level.WARN_INT:
+ return lbLogger.isWarnEnabled();
+ case Level.ERROR_INT:
+ return lbLogger.isErrorEnabled();
+ case Level.FATAL_INT:
+ return lbLogger.isErrorEnabled();
+ }
+ return false;
+ }
/**
- * Delegates to {@link org.slf4j.Logger#isErrorEnabled} method of the SLF4J
- * API.
+ * Delegates to {@link ch.qos.logback.classic.Logger#isErrorEnabled} method of logback
*/
public boolean isErrorEnabled() {
return lbLogger.isErrorEnabled();
}
/**
- * Delegates to {@link org.slf4j.Logger#debug(String)} method of the SLF4J
- * API, in addition, the call is marked with a marker named "TRACE".
+ * Delegates to {@link ch.qos.logback.classic.Logger#debug(String)} method of logback,
+ * in addition, the call is marked with a marker named "TRACE".
*/
public void trace(Object message) {
lbLogger.debug(TRACE_MARKER, (String) message);
}
/**
- * Delegates to {@link org.slf4j.Logger#debug(String,Throwable)} method of the
- * SLF4J API, in addition, the call is marked with a marker named "TRACE".
+ * Delegates to {@link ch.qos.logback.classic.Logger#debug(String,Throwable)}
+ * method of logback in addition, the call is marked with a marker named "TRACE".
*/
public void trace(Object message, Throwable t) {
lbLogger.debug(TRACE_MARKER, (String) message, t);
}
+
+ /**
+ * Delegates to {@link ch.qos.logback.classic.Logger#debug(String,Object)}
+ * method of logback in addition, the call is marked with a marker named "TRACE".
+ */
+ public void trace(Object message, Object o) {
+ lbLogger.debug(TRACE_MARKER, (String)message, o);
+ }
/**
- * Delegates to {@link org.slf4j.Logger#debug(String)} method of the SLF4J
- * API.
+ * Delegates to {@link ch.qos.logback.classic.Logger#debug(String,Object,Object)}
+ * method of logback in addition, the call is marked with a marker named "TRACE".
+ */
+ public void trace(String message, Object arg1, Object arg2) {
+ lbLogger.debug(TRACE_MARKER, message, arg1, arg2);
+ }
+
+ /**
+ * Delegates to {@link ch.qos.logback.classic.Logger#debug(String)} method of
+ * logback.
*/
public void debug(Object message) {
// casting to String as SLF4J only accepts String instances, not Object
@@ -146,97 +177,177 @@
}
/**
- * Delegates to {@link org.slf4j.Logger#debug(String,Throwable)} method of the
- * SLF4J API.
+ * Delegates to {@link ch.qos.logback.classic.Logger#debug(String,Throwable)}
+ * method of logback.
*/
public void debug(Object message, Throwable t) {
lbLogger.debug((String) message, t);
}
/**
- * Delegates to {@link org.slf4j.Logger#info(String)} method of the SLF4J API.
+ * Delegates to {@link ch.qos.logback.classic.Logger#debug(String,Object)}
+ * method of logback.
+ */
+ public void debug(Object message, Object o) {
+ lbLogger.debug((String)message, o);
+ }
+
+ /**
+ * Delegates to {@link ch.qos.logback.classic.Logger#debug(String,Object,Object)}
+ * method of logback.
+ */
+ public void debug(String message, Object arg1, Object arg2) {
+ lbLogger.debug(message, arg1, arg2);
+ }
+
+ /**
+ * Delegates to {@link ch.qos.logback.classic.Logger#info(String)}
+ * method of logback.
*/
public void info(Object message) {
lbLogger.info((String) message);
}
/**
- * Delegates to {@link org.slf4j.Logger#info(String, Throwable)} method of the
- * SLF4J API.
+ * Delegates to {@link ch.qos.logback.classic.Logger#info(String,Throwable)}
+ * method of logback.
*/
public void info(Object message, Throwable t) {
lbLogger.info((String) message, t);
}
/**
- * Delegates to {@link org.slf4j.Logger#warn(String)} method of the SLF4J API.
+ * Delegates to {@link ch.qos.logback.classic.Logger#info(String,Object)}
+ * method of logback.
+ */
+ public void info(Object message, Object o) {
+ lbLogger.info((String) message, o);
+ }
+
+ /**
+ * Delegates to {@link ch.qos.logback.classic.Logger#info(String,Object,Object)}
+ * method of logback.
+ */
+ public void info(String message, Object arg1, Object arg2) {
+ lbLogger.info(message, arg1, arg2);
+ }
+
+ /**
+ * Delegates to {@link ch.qos.logback.classic.Logger#warn(String)}
+ * method of logback.
*/
public void warn(Object message) {
lbLogger.warn((String) message);
}
/**
- * Delegates to {@link org.slf4j.Logger#warn(String,Throwable)} method of the
- * SLF4J API.
+ * Delegates to {@link ch.qos.logback.classic.Logger#warn(String,Throwable)}
+ * method of logback.
*/
public void warn(Object message, Throwable t) {
lbLogger.warn((String) message, t);
}
/**
- * Delegates to {@link org.slf4j.Logger#error(String)} method of the SLF4J
- * API.
+ * Delegates to {@link ch.qos.logback.classic.Logger#warn(String,Object)}
+ * method of logback.
+ */
+ public void warn(Object message, Object o) {
+ lbLogger.warn((String)message, o);
+ }
+
+ /**
+ * Delegates to {@link ch.qos.logback.classic.Logger#warn(String,Object,Object)}
+ * method of logback.
+ */
+ public void warn(String message, Object arg1, Object arg2) {
+ lbLogger.warn(message, arg1, arg2);
+ }
+
+ /**
+ * Delegates to {@link ch.qos.logback.classic.Logger#error(String)}
+ * method of logback.
*/
public void error(Object message) {
lbLogger.error((String) message);
}
/**
- * Delegates to {@link org.slf4j.Logger#error(String,Throwable)} method of the
- * SLF4J API.
+ * Delegates to {@link ch.qos.logback.classic.Logger#error(String,Throwable)}
+ * method of logback.
*/
public void error(Object message, Throwable t) {
lbLogger.error((String) message, t);
}
/**
- * Delegates to {@link org.slf4j.Logger#error(String)} method of the SLF4J
- * API, in addition, the call is marked with a marker named "FATAL".
+ * Delegates to {@link ch.qos.logback.classic.Logger#error(String,Object)}
+ * method of logback.
+ */
+ public void error(Object message, Object o) {
+ lbLogger.error((String)message, o);
+ }
+
+ /**
+ * Delegates to {@link ch.qos.logback.classic.Logger#error(String,Object,Object)}
+ * method of logback.
+ */
+ public void error(String message, Object arg1, Object arg2) {
+ lbLogger.error(message, arg1, arg2);
+ }
+
+ /**
+ * Delegates to {@link ch.qos.logback.classic.Logger#error(String)}
+ * method of logback.
*/
public void fatal(Object message) {
lbLogger.error(FATAL_MARKER, (String) message);
}
/**
- * Delegates to {@link org.slf4j.Logger#error(String,Throwable)} method of the
- * SLF4J API, in addition, the call is marked with a marker named "FATAL".
+ * Delegates to {@link ch.qos.logback.classic.Logger#error(String,Throwable)}
+ * method of logback in addition, the call is marked with a marker named "FATAL".
*/
public void fatal(Object message, Throwable t) {
lbLogger.error(FATAL_MARKER, (String) message, t);
}
+ /**
+ * Delegates to {@link ch.qos.logback.classic.Logger#error(String,Object)}
+ * method of logback in addition, the call is marked with a marker named "FATAL".
+ */
+ public void fatal(Object message, Object o) {
+ lbLogger.error(FATAL_MARKER, (String)message, o);
+ }
+
+ /**
+ * Delegates to {@link ch.qos.logback.classic.Logger#error(String,Object,Object)}
+ * method of logback in addition, the call is marked with a marker named "FATAL".
+ */
+ public void fatal(String message, Object arg1, Object arg2) {
+ lbLogger.error(FATAL_MARKER, message, arg1, arg2);
+ }
+
public void log(String FQCN, Priority p, Object msg, Throwable t) {
- ch.qos.logback.classic.Level level;
+ ch.qos.logback.classic.Level level = priorityToLevel(p);
+ lbLogger.filterAndLog(FQCN, null, level, msg.toString(), null, t);
+ }
+
+ private ch.qos.logback.classic.Level priorityToLevel(Priority p) {
switch (p.level) {
case Priority.DEBUG_INT:
- level = ch.qos.logback.classic.Level.DEBUG;
- break;
+ return ch.qos.logback.classic.Level.DEBUG;
case Priority.INFO_INT:
- level = ch.qos.logback.classic.Level.INFO;
- break;
+ return ch.qos.logback.classic.Level.INFO;
case Priority.WARN_INT:
- level = ch.qos.logback.classic.Level.WARN;
- break;
+ return ch.qos.logback.classic.Level.WARN;
case Priority.ERROR_INT:
- level = ch.qos.logback.classic.Level.ERROR;
- break;
+ return ch.qos.logback.classic.Level.ERROR;
case Priority.FATAL_INT:
- level = ch.qos.logback.classic.Level.ERROR;
- break;
+ return ch.qos.logback.classic.Level.ERROR;
default:
throw new IllegalStateException("Unknown Priority " + p);
}
- lbLogger.filterAndLog(FQCN, null, level, msg.toString(), null, t);
}
}
Added: logback/trunk/log4j-bridge/src/main/java/org/apache/log4j/MDC.java
==============================================================================
--- (empty file)
+++ logback/trunk/log4j-bridge/src/main/java/org/apache/log4j/MDC.java Wed Dec 13 21:40:54 2006
@@ -0,0 +1,28 @@
+package org.apache.log4j;
+
+public class MDC {
+
+ public static void put(String key, String value) {
+ ch.qos.logback.classic.MDC.put(key, value);
+ }
+
+ public static void put(String key, Object value) {
+ if (value != null) {
+ put(key, value.toString());
+ } else {
+ put(key, null);
+ }
+ }
+
+ public static Object get(String key) {
+ return ch.qos.logback.classic.MDC.get(key);
+ }
+
+ public static void remove(String key) {
+ ch.qos.logback.classic.MDC.remove(key);
+ }
+
+ public static void clear() {
+ ch.qos.logback.classic.MDC.clear();
+ }
+}
1
0
Online report : http://localhost:8090/continuum/servlet/continuum/target/ProjectBuild.vm/vi…
Build statistics:
State: Ok
Previous State: Failed
Started at: Wed, 13 Dec 2006 15:28:07 +0100
Finished at: Wed, 13 Dec 2006 15:28:26 +0100
Total time: 19s
Build Trigger: Forced
Exit code: 0
Building machine hostname: pixie
Operating system : Linux(unknown)
Java version : 1.5.0_08(Sun Microsystems Inc.)
Changes
No files changed
****************************************************************************
Output:
****************************************************************************
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Logback Classic Module
[INFO] task-segment: [clean, install]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /opt/continuum-1.0.3/apps/continuum/working-directory/46/target
[INFO] Deleting directory /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/classes
[INFO] Deleting directory /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/test-classes
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
Compiling 73 source files to /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/classes
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
Compiling 68 source files to /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/test-classes
[INFO] [surefire:test]
[INFO] Surefire report directory: /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running ch.qos.logback.classic.LoggerContextTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.051 sec
Running ch.qos.logback.classic.pattern.ClassNameAbbreviatorTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec
Running ch.qos.logback.classic.pattern.MDCConverterTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 sec
Running ch.qos.logback.classic.PatternLayoutTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.026 sec
Running ch.qos.logback.classic.MessageFormattingTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.024 sec
Running ch.qos.logback.classic.control.TestAction
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec
Running ch.qos.logback.classic.DynamicLoggerContextTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.758 sec
Running ch.qos.logback.classic.pattern.ConverterTest
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.129 sec
Running ch.qos.logback.classic.util.InitializationTest
TEST 15:28:21.096 [main] DEBUG c.q.l.c.util.InitializationTest - Hello-didily-odily
TEST 15:28:21.096 [main] DEBUG c.q.l.c.util.InitializationTest - Hello-didily-odily
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec
Running ch.qos.logback.classic.db.DBAppenderTest
[Server@4229ab3e]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@4229ab3e]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@4229ab3e]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@4229ab3e]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@4229ab3e]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@4229ab3e]: [Thread[main,5,main]]: setDatabasePath(0,mem:test;sql.enforce_strict_size=true)
[Server@643c0007]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@643c0007]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@643c0007]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@643c0007]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@643c0007]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@643c0007]: [Thread[main,5,main]]: setDatabasePath(0,mem:test;sql.enforce_strict_size=true)
[Server@647109c4]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@647109c4]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@647109c4]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@647109c4]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@647109c4]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@647109c4]: [Thread[main,5,main]]: setDatabasePath(0,mem:test;sql.enforce_strict_size=true)
[Server@7b36a43c]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@7b36a43c]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@7b36a43c]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@7b36a43c]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@7b36a43c]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@7b36a43c]: [Thread[main,5,main]]: setDatabasePath(0,mem:test;sql.enforce_strict_size=true)
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.873 sec
Running ch.qos.logback.classic.LoggerPerfTest
Running on pixie
Average log time for disabled statements: 7.0 nanos.
Running on pixie
Average log time for disabled statements: 29.0 nanos.
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.797 sec
Running ch.qos.logback.classic.html.HTMLLayoutTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.679 sec
Running ch.qos.logback.classic.control.RandomUtilTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec
Running ch.qos.logback.classic.turbo.MarkerFilterTest
LOGBACK: No context given for ch.qos.logback.classic.turbo.MarkerFilter@3c3c9217
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec
Running ch.qos.logback.classic.net.SocketAppenderTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.45 sec
Running ch.qos.logback.classic.control.ScenarioMakerTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.042 sec
Running ch.qos.logback.classic.net.LoggingEventSerializationTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.019 sec
Running ch.qos.logback.classic.control.CLCTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec
Running ch.qos.logback.classic.MDCTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec
Running ch.qos.logback.classic.BasicLoggerTest
|-WARN in ch.qos.logback.core.read.ListAppender[null] - Attempted to append to non started appender [null].
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec
Running ch.qos.logback.classic.net.SMTPAppenderTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.076 sec
Running ch.qos.logback.classic.boolex.JaninoEventEvaluatorTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.489 sec
Running ch.qos.logback.classic.joran.EvaluatorJoranTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.026 sec
Running ch.qos.logback.classic.spi.ContextListenerTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec
Running ch.qos.logback.classic.net.SyslogAppenderTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.231 sec
Running ch.qos.logback.classic.joran.BasicJoranTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.036 sec
Results :
Tests run: 108, Failures: 0, Errors: 0, Skipped: 0
[INFO] [jar:jar]
[INFO] Building jar: /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/logback-classic-0.7-SNAPSHOT.jar
[INFO] Preparing source:jar
[WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation.
[INFO] No goals needed for project - skipping
[INFO] [source:jar {execution: default}]
[INFO] Building jar: /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/logback-classic-0.7-SNAPSHOT-sources.jar
[INFO] [jar:jar {execution: bundle-test-jar}]
[INFO] Building jar: /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/logback-classic-0.7-SNAPSHOT.jar
[INFO] [jar:test-jar {execution: bundle-test-jar}]
[INFO] Building jar: /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/logback-classic-0.7-SNAPSHOT-tests.jar
[INFO] [install:install]
[INFO] Installing /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/logback-classic-0.7-SNAPSHOT.jar to /root/.m2/repository/ch/qos/logback/logback-classic/0.7-SNAPSHOT/logback-classic-0.7-SNAPSHOT.jar
[INFO] Installing /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/logback-classic-0.7-SNAPSHOT-sources.jar to /root/.m2/repository/ch/qos/logback/logback-classic/0.7-SNAPSHOT/logback-classic-0.7-SNAPSHOT-sources.jar
[INFO] Installing /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/logback-classic-0.7-SNAPSHOT-tests.jar to /root/.m2/repository/ch/qos/logback/logback-classic/0.7-SNAPSHOT/logback-classic-0.7-SNAPSHOT-tests.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17 seconds
[INFO] Finished at: Wed Dec 13 15:28:26 CET 2006
[INFO] Final Memory: 15M/170M
[INFO] ------------------------------------------------------------------------
****************************************************************************
1
0
Online report : http://localhost:8090/continuum/servlet/continuum/target/ProjectBuild.vm/vi…
Build statistics:
State: Failed
Previous State: Ok
Started at: Wed, 13 Dec 2006 15:20:30 +0100
Finished at: Wed, 13 Dec 2006 15:20:47 +0100
Total time: 16s
Build Trigger: Schedule
Exit code: 1
Building machine hostname: pixie
Operating system : Linux(unknown)
Java version : 1.5.0_08(Sun Microsystems Inc.)
Changes
src/main/java/ch/qos/logback/classic/MDC.java
src/main/java/ch/qos/logback/classic/turbo/TurboFilter.java
****************************************************************************
Output:
****************************************************************************
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Logback Classic Module
[INFO] task-segment: [clean, install]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /opt/continuum-1.0.3/apps/continuum/working-directory/46/target
[INFO] Deleting directory /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/classes
[INFO] Deleting directory /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/test-classes
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
Compiling 73 source files to /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/classes
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
Compiling 68 source files to /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/test-classes
[INFO] [surefire:test]
[INFO] Surefire report directory: /opt/continuum-1.0.3/apps/continuum/working-directory/46/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running ch.qos.logback.classic.LoggerContextTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.089 sec
Running ch.qos.logback.classic.pattern.ClassNameAbbreviatorTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.012 sec
Running ch.qos.logback.classic.pattern.MDCConverterTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec
Running ch.qos.logback.classic.PatternLayoutTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.027 sec
Running ch.qos.logback.classic.MessageFormattingTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec
Running ch.qos.logback.classic.control.TestAction
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.009 sec
Running ch.qos.logback.classic.DynamicLoggerContextTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.601 sec
Running ch.qos.logback.classic.pattern.ConverterTest
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.133 sec
Running ch.qos.logback.classic.util.InitializationTest
TEST 15:20:41.482 [main] DEBUG c.q.l.c.util.InitializationTest - Hello-didily-odily
TEST 15:20:41.482 [main] DEBUG c.q.l.c.util.InitializationTest - Hello-didily-odily
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec
Running ch.qos.logback.classic.db.DBAppenderTest
[Server@4229ab3e]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@4229ab3e]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@4229ab3e]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@4229ab3e]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@4229ab3e]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@4229ab3e]: [Thread[main,5,main]]: setDatabasePath(0,mem:test;sql.enforce_strict_size=true)
[Server@3dbbd23f]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@3dbbd23f]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@3dbbd23f]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@3dbbd23f]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@3dbbd23f]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@3dbbd23f]: [Thread[main,5,main]]: setDatabasePath(0,mem:test;sql.enforce_strict_size=true)
[Server@5d3ad33d]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@5d3ad33d]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@5d3ad33d]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@5d3ad33d]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@5d3ad33d]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@5d3ad33d]: [Thread[main,5,main]]: setDatabasePath(0,mem:test;sql.enforce_strict_size=true)
[Server@21aed5f9]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@21aed5f9]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@21aed5f9]: [Thread[main,5,main]]: setDatabaseName(0,test)
[Server@21aed5f9]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@21aed5f9]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@21aed5f9]: [Thread[main,5,main]]: setDatabasePath(0,mem:test;sql.enforce_strict_size=true)
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.8 sec
Running ch.qos.logback.classic.LoggerPerfTest
Running on pixie
Average log time for disabled statements: 7.0 nanos.
Running on pixie
Average log time for disabled statements: 19.0 nanos.
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.662 sec
Running ch.qos.logback.classic.html.HTMLLayoutTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.474 sec
Running ch.qos.logback.classic.control.RandomUtilTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.094 sec
Running ch.qos.logback.classic.turbo.MarkerFilterTest
LOGBACK: No context given for ch.qos.logback.classic.turbo.MarkerFilter@148238f4
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec
Running ch.qos.logback.classic.net.SocketAppenderTest
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at java.net.ServerSocket.<init>(ServerSocket.java:97)
at ch.qos.logback.classic.net.MockSocketServer.run(MockSocketServer.java:48)
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at java.net.ServerSocket.<init>(ServerSocket.java:97)
at ch.qos.logback.classic.net.MockSocketServer.run(MockSocketServer.java:48)
Tests run: 5, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 2.482 sec <<< FAILURE!
Running ch.qos.logback.classic.control.ScenarioMakerTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.065 sec
Running ch.qos.logback.classic.net.LoggingEventSerializationTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.018 sec
Running ch.qos.logback.classic.control.CLCTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec
Running ch.qos.logback.classic.MDCTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec
Running ch.qos.logback.classic.BasicLoggerTest
|-WARN in ch.qos.logback.core.read.ListAppender[null] - Attempted to append to non started appender [null].
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec
Running ch.qos.logback.classic.net.SMTPAppenderTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.087 sec
Running ch.qos.logback.classic.boolex.JaninoEventEvaluatorTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.531 sec
Running ch.qos.logback.classic.joran.EvaluatorJoranTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.026 sec
Running ch.qos.logback.classic.spi.ContextListenerTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.025 sec
Running ch.qos.logback.classic.net.SyslogAppenderTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.226 sec
Running ch.qos.logback.classic.joran.BasicJoranTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.038 sec
Results :
Tests run: 108, Failures: 3, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15 seconds
[INFO] Finished at: Wed Dec 13 15:20:47 CET 2006
[INFO] Final Memory: 13M/144M
[INFO] ------------------------------------------------------------------------
****************************************************************************
1
0

svn commit: r1081 - logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic
by noreply.seb@qos.ch 13 Dec '06
by noreply.seb@qos.ch 13 Dec '06
13 Dec '06
Author: seb
Date: Wed Dec 13 15:16:09 2006
New Revision: 1081
Modified:
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/MDC.java
Log:
javadoc update
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/MDC.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/MDC.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/MDC.java Wed Dec 13 15:16:09 2006
@@ -15,6 +15,9 @@
* its parent.
* <p>
*
+ * For more informations about turbo filters, please refer to the online manual at
+ * http://logback.qos.ch/manual/mdc.html
+ *
* @author Ceki Gülcü
*/
public class MDC {
1
0

svn commit: r1080 - in logback/trunk: logback-classic/src/main/java/ch/qos/logback/classic/turbo logback-core/src/main/java/ch/qos/logback/core/filter
by noreply.seb@qos.ch 13 Dec '06
by noreply.seb@qos.ch 13 Dec '06
13 Dec '06
Author: seb
Date: Wed Dec 13 15:06:07 2006
New Revision: 1080
Modified:
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/turbo/TurboFilter.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter/EvaluatorFilter.java
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter/Filter.java
Log:
javadoc updates
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/turbo/TurboFilter.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/turbo/TurboFilter.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/turbo/TurboFilter.java Wed Dec 13 15:06:07 2006
@@ -12,6 +12,9 @@
* TurboFilter is a specialized filter with a decide method that takes a bunch
* of parameters instead of a single event object. The latter is cleaner but
* the latter is much more performant.
+ * <p>
+ * For more informations about turbo filters, please refer to the online manual at
+ * http://logback.qos.ch/manual/filters.html#TurboFilter
*
* @author Ceki Gulcu
*/
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter/EvaluatorFilter.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter/EvaluatorFilter.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter/EvaluatorFilter.java Wed Dec 13 15:06:07 2006
@@ -15,6 +15,9 @@
* a given result must be returned after the evaluation either failed or succeeded.
* </p>
*
+ * For more informations about filters, please refer to the online manual at
+ * http://logback.qos.ch/manual/filters.html
+ *
* @author Ceki Gülcü
* @author Sébastien Pennec
*/
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter/Filter.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter/Filter.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter/Filter.java Wed Dec 13 15:06:07 2006
@@ -10,28 +10,8 @@
* and understand the built-in rules before rushing to write your own custom
* filters.
* <p>
- * This abstract class assumes and also imposes that filters be organized in a
- * linear chain. The {@link #decide decide(Object)} method of each filter is
- * called sequentially, in the order of their addition to the chain.
- * <p>
- * The decide() method must return one of the FilterReplies {@link #DENY},
- * {@link #NEUTRAL} or {@link #ACCEPT}.
- * <p>
- * If the value DENY is returned, then the log event is dropped immediately
- * without consulting with the remaining filters.
- *
- * <p>
- * If the value NEUTRAL is returned, then the next filter in the chain is
- * consulted. If there are no more filters in the chain, then the log event is
- * logged. Thus, in the presence of no filters, the default behaviour is to log
- * all logging events.
- *
- * <p>
- * If the value ACCEPT is returned, then the log event is logged without
- * consulting the remaining filters.
- *
- * <p>
- * The philosophy of logback filters are largely inspired from Linux ipchains.
+ * For more informations about filters, please refer to the online manual at
+ * http://logback.qos.ch/manual/filters.html
*
* @author Ceki Gülcü
*/
1
0

svn commit: r1079 - logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter
by noreply.seb@qos.ch 13 Dec '06
by noreply.seb@qos.ch 13 Dec '06
13 Dec '06
Author: seb
Date: Wed Dec 13 15:00:45 2006
New Revision: 1079
Removed:
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter/AbstractEvalutatorFilter.java
Modified:
logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter/EvaluatorFilter.java
Log:
Removed unecessary class and moved its content into EvaluatorFilter
Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter/EvaluatorFilter.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter/EvaluatorFilter.java (original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter/EvaluatorFilter.java Wed Dec 13 15:00:45 2006
@@ -4,10 +4,48 @@
import ch.qos.logback.core.boolex.EventEvaluator;
import ch.qos.logback.core.spi.FilterReply;
-public class EvaluatorFilter extends AbstractEvalutatorFilter {
+/**
+ * The value of the {@link #onMatch} and {@link #onMismatch} attributes is set to
+ * {@link Filter.NEUTRAL}, so that a badly configured evaluator filter doesn't
+ * disturb the functionning of the chain.
+ * </p>
+ * <p>
+ * It is expected that one of the two attributes will have its value changed to
+ * {@link Filter.ACCEPT} or {@link Filter.DENY}. That way, it is possible to decide if
+ * a given result must be returned after the evaluation either failed or succeeded.
+ * </p>
+ *
+ * @author Ceki Gülcü
+ * @author Sébastien Pennec
+ */
+
+public class EvaluatorFilter extends Filter {
EventEvaluator evaluator;
+ protected FilterReply onMatch = FilterReply.NEUTRAL;
+ protected FilterReply onMismatch = FilterReply.NEUTRAL;
+
+ final public void setOnMatch(String action) {
+ if ("NEUTRAL".equals(action)) {
+ onMatch = FilterReply.NEUTRAL;
+ } else if ("ACCEPT".equals(action)) {
+ onMatch = FilterReply.ACCEPT;
+ } else if ("DENY".equals(action)) {
+ onMatch = FilterReply.DENY;
+ }
+ }
+
+ final public void setOnMismatch(String action) {
+ if ("NEUTRAL".equals(action)) {
+ onMismatch = FilterReply.NEUTRAL;
+ } else if ("ACCEPT".equals(action)) {
+ onMismatch = FilterReply.ACCEPT;
+ } else if ("DENY".equals(action)) {
+ onMismatch = FilterReply.DENY;
+ }
+ }
+
@Override
public void start() {
if(evaluator != null) {
1
0