[LOGBack-dev] svn commit: r383 - logback/classic/trunk/src/main/java/ch/qos/logback
noreply.seb at qos.ch
noreply.seb at qos.ch
Fri Jul 28 19:01:19 CEST 2006
Author: seb
Date: Fri Jul 28 19:01:18 2006
New Revision: 383
Modified:
logback/classic/trunk/src/main/java/ch/qos/logback/BasicConfigurator.java
Log:
corrected pattern + supressed code duplication
Modified: logback/classic/trunk/src/main/java/ch/qos/logback/BasicConfigurator.java
==============================================================================
--- logback/classic/trunk/src/main/java/ch/qos/logback/BasicConfigurator.java (original)
+++ logback/classic/trunk/src/main/java/ch/qos/logback/BasicConfigurator.java Fri Jul 28 19:01:18 2006
@@ -14,7 +14,7 @@
ca.setContext(lc);
ca.setName("console");
PatternLayout pl = new PatternLayout();
- pl.setPattern("%-4r [%t] %-5p %c %x - %m%n");
+ pl.setPattern("%-4relative [%thread] %-5level %class - %msg%n");
pl.start();
ca.setLayout(pl);
@@ -26,16 +26,6 @@
public static void configureDefaultContext() {
Logger logger = (Logger) LoggerFactory.getLogger(BasicConfigurator.class);
LoggerContext lc = logger.getLoggerContext();
- ConsoleAppender ca = new ConsoleAppender();
- ca.setContext(lc);
- ca.setName("console");
- PatternLayout pl = new PatternLayout();
- pl.setPattern("%m%n");
- pl.start();
-
- ca.setLayout(pl);
- ca.start();
- Logger rootLogger = lc.getRootLogger();
- rootLogger.addAppender(ca);
+ configure(lc);
}
}
More information about the logback-dev
mailing list