[logback-dev] svn commit: r892 - in logback/trunk: logback-classic/src/main/java/ch/qos/logback/classic logback-classic/src/main/java/ch/qos/logback/classic/net logback-classic/src/test/java/ch/qos/logback/classic/util logback-examples/src/main/java/chapter4 logback-examples/src/main/java/chapter4/mail logback-examples/src/main/java/chapter4/socket
noreply.seb at qos.ch
noreply.seb at qos.ch
Fri Nov 10 11:07:46 CET 2006
Author: seb
Date: Fri Nov 10 11:07:46 2006
New Revision: 892
Modified:
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/LoggerContext.java
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SimpleSocketServer.java
logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/util/InitializationTest.java
logback/trunk/logback-examples/src/main/java/chapter4/ConfigurationTester.java
logback/trunk/logback-examples/src/main/java/chapter4/ExitWoes1.java
logback/trunk/logback-examples/src/main/java/chapter4/ExitWoes2.java
logback/trunk/logback-examples/src/main/java/chapter4/mail/EMail.java
logback/trunk/logback-examples/src/main/java/chapter4/socket/SocketClient2.java
Log:
renamed LoggerContext's reset() method to shutdownAndReset()
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/LoggerContext.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/LoggerContext.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/LoggerContext.java Fri Nov 10 11:07:46 2006
@@ -163,7 +163,7 @@
return loggerContextRemoteView;
}
- public void reset() {
+ public void shutdownAndReset() {
root.recursiveReset();
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SimpleSocketServer.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SimpleSocketServer.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SimpleSocketServer.java Fri Nov 10 11:07:46 2006
@@ -92,7 +92,7 @@
if (configFile.endsWith(".xml")) {
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
JoranConfigurator configurator = new JoranConfigurator();
- lc.reset();
+ lc.shutdownAndReset();
configurator.setContext(lc);
configurator.doConfigure(configFile);
//StatusPrinter.print(lc);
Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/util/InitializationTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/util/InitializationTest.java (original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/util/InitializationTest.java Fri Nov 10 11:07:46 2006
@@ -38,7 +38,7 @@
assertTrue(appender instanceof ConsoleAppender);
}
{
- lc.reset();
+ lc.shutdownAndReset();
Appender appender = root.getAppender("STDOUT");
assertNull(appender);
}
Modified: logback/trunk/logback-examples/src/main/java/chapter4/ConfigurationTester.java
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/ConfigurationTester.java (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/ConfigurationTester.java Fri Nov 10 11:07:46 2006
@@ -32,7 +32,7 @@
try {
JoranConfigurator configurator = new JoranConfigurator();
configurator.setContext(lc);
- lc.reset();
+ lc.shutdownAndReset();
configurator.doConfigure(args[0]);
} catch (JoranException je) {
je.printStackTrace();
Modified: logback/trunk/logback-examples/src/main/java/chapter4/ExitWoes1.java
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/ExitWoes1.java (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/ExitWoes1.java Fri Nov 10 11:07:46 2006
@@ -24,7 +24,7 @@
public static void main(String[] args) throws Exception {
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
- lc.reset();//this is to cancel default-config.
+ lc.shutdownAndReset();//this is to cancel default-config.
WriterAppender writerAppender = new WriterAppender();
writerAppender.setContext(lc);
writerAppender.setLayout(new EchoLayout());
Modified: logback/trunk/logback-examples/src/main/java/chapter4/ExitWoes2.java
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/ExitWoes2.java (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/ExitWoes2.java Fri Nov 10 11:07:46 2006
@@ -24,7 +24,7 @@
public static void main(String[] args) throws Exception {
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
- lc.reset();//this is to cancel default-config.
+ lc.shutdownAndReset();//this is to cancel default-config.
WriterAppender writerAppender = new WriterAppender();
writerAppender.setContext(lc);
writerAppender.setLayout(new EchoLayout());
@@ -38,6 +38,6 @@
logger.debug("Hello world.");
- lc.reset();
+ lc.shutdownAndReset();
}
}
\ No newline at end of file
Modified: logback/trunk/logback-examples/src/main/java/chapter4/mail/EMail.java
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/mail/EMail.java (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/mail/EMail.java Fri Nov 10 11:07:46 2006
@@ -35,7 +35,7 @@
if (configFile.endsWith(".xml")) {
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
JoranConfigurator configurator = new JoranConfigurator();
- lc.reset();
+ lc.shutdownAndReset();
configurator.setContext(lc);
configurator.doConfigure(configFile);
//StatusPrinter.print(lc);
Modified: logback/trunk/logback-examples/src/main/java/chapter4/socket/SocketClient2.java
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/socket/SocketClient2.java (original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/socket/SocketClient2.java Fri Nov 10 11:07:46 2006
@@ -45,7 +45,7 @@
if (configFile.endsWith(".xml")) {
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
JoranConfigurator configurator = new JoranConfigurator();
- lc.reset();
+ lc.shutdownAndReset();
configurator.setContext(lc);
configurator.doConfigure(configFile);
}
More information about the logback-dev
mailing list