[logback-dev] svn commit: r1097 - logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/action
noreply.seb at qos.ch
noreply.seb at qos.ch
Mon Dec 18 10:45:22 CET 2006
Author: seb
Date: Mon Dec 18 10:45:22 2006
New Revision: 1097
Modified:
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/ConfigurationAction.java
Log:
Added debug attribute and status printing
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/ConfigurationAction.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/ConfigurationAction.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/ConfigurationAction.java Mon Dec 18 10:45:22 2006
@@ -12,14 +12,16 @@
import org.xml.sax.Attributes;
+import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.core.joran.action.Action;
import ch.qos.logback.core.joran.spi.InterpretationContext;
+import ch.qos.logback.core.util.StatusPrinter;
public class ConfigurationAction extends Action {
static final String INTERNAL_DEBUG_ATTR = "debug";
- boolean attachment = false;
+ boolean debugMode = false;
public void begin(InterpretationContext ec, String name, Attributes attributes) {
String debugAttrib = attributes.getValue(INTERNAL_DEBUG_ATTR);
@@ -32,7 +34,7 @@
//LoggerContext loggerContext = (LoggerContext) context;
//ConfiguratorBase.attachTemporaryConsoleAppender(context);
- attachment = true;
+ debugMode = true;
}
// the context is turbo filter attachable, so it is pushed on top of the stack
@@ -40,8 +42,11 @@
}
public void end(InterpretationContext ec, String name) {
- if (attachment) {
+ if (debugMode) {
addInfo("End of configuration.");
+ LoggerContext loggerContext = (LoggerContext) context;
+ StatusPrinter.print(loggerContext);
+
//LoggerContext loggerContext = (LoggerContext) context;
//ConfiguratorBase.detachTemporaryConsoleAppender(repository, errorList);
}
More information about the logback-dev
mailing list