[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. v_0.9.21-6-gc641f97

added by portage for gitosis-gentoo git-noreply at pixie.qos.ch
Sun Jun 13 22:41:46 CEST 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Logback: the generic, reliable, fast and flexible logging framework.".

The branch, master has been updated
       via  c641f97153aecc6791e95cad237ae8706f28102e (commit)
      from  521dfe290dfa34fadb247ee63607a0cddaaf181f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=c641f97153aecc6791e95cad237ae8706f28102e
http://github.com/ceki/logback/commit/c641f97153aecc6791e95cad237ae8706f28102e

commit c641f97153aecc6791e95cad237ae8706f28102e
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Sun Jun 13 22:38:51 2010 +0200

    ongoing work on logback.groovy detection

diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/util/ContextInitializer.java b/logback-classic/src/main/java/ch/qos/logback/classic/util/ContextInitializer.java
index 020c97b..48682da 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/util/ContextInitializer.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/util/ContextInitializer.java
@@ -66,19 +66,17 @@ public class ContextInitializer {
       } else {
         StatusManager sm = loggerContext.getStatusManager();
         if (url == null) {
-          sm.add(new ErrorStatus("Groovy classes are not available on the class path]",
+          sm.add(new ErrorStatus("Groovy classes are not available on the class path. Aborting initialization.",
                   loggerContext));
         }
       }
-
-
-      if (url.toString().endsWith("xml")) {
-        JoranConfigurator configurator = new JoranConfigurator();
-        configurator.setContext(loggerContext);
-        configurator.doConfigure(url);
-      }
-
     }
+    if (url.toString().endsWith("xml")) {
+      JoranConfigurator configurator = new JoranConfigurator();
+      configurator.setContext(loggerContext);
+      configurator.doConfigure(url);
+    }
+  }
 
   void joranConfigureByResource(URL url) throws JoranException {
     JoranConfigurator configurator = new JoranConfigurator();
@@ -88,7 +86,6 @@ public class ContextInitializer {
 
   private URL findConfigFileURLFromSystemProperties(ClassLoader classLoader, boolean updateStatus) {
     String logbackConfigFile = OptionHelper.getSystemProperty(CONFIG_FILE_PROPERTY);
-
     if (logbackConfigFile != null) {
       URL result = null;
       try {
@@ -139,9 +136,9 @@ public class ContextInitializer {
   }
 
   private URL getResource(String filename, ClassLoader myClassLoader, boolean updateStatus) {
-    URL url = Loader.getResource(GROOVY_AUTOCONFIG_FILE, myClassLoader);
+    URL url = Loader.getResource(filename, myClassLoader);
     if (updateStatus) {
-      statusOnResourceSearch(GROOVY_AUTOCONFIG_FILE, myClassLoader, url);
+      statusOnResourceSearch(filename, myClassLoader, url);
     }
     return url;
   }
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/util/InitializationTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/util/InitializationTest.java
index 519c1eb..b6852a7 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/util/InitializationTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/util/InitializationTest.java
@@ -21,6 +21,8 @@ import static org.junit.Assert.assertEquals;
 
 import java.util.List;
 
+import ch.qos.logback.core.util.OptionHelper;
+import ch.qos.logback.core.util.StatusPrinter;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Ignore;

-----------------------------------------------------------------------

Summary of changes:
 .../logback/classic/util/ContextInitializer.java   |   21 ++++++++-----------
 .../logback/classic/util/InitializationTest.java   |    2 +
 2 files changed, 11 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
Logback: the generic, reliable, fast and flexible logging framework.


More information about the logback-dev mailing list