[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch master updated. v_1.0.2-7-g0a2446b

Gitbot git-noreply at pixie.qos.ch
Thu May 3 18:30:14 CEST 2012


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  0a2446b85f3ba811d9cbd153f3e591ca44ea4e0f (commit)
      from  d903644be47ceaf38b437a921c3163a2335d9d5e (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=0a2446b85f3ba811d9cbd153f3e591ca44ea4e0f
http://github.com/ceki/logback/commit/0a2446b85f3ba811d9cbd153f3e591ca44ea4e0f

commit 0a2446b85f3ba811d9cbd153f3e591ca44ea4e0f
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Thu May 3 18:29:18 2012 +0200

    Fix http://jira.qos.ch/browse/LBCLASSIC-256

diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/jul/LevelChangePropagator.java b/logback-classic/src/main/java/ch/qos/logback/classic/jul/LevelChangePropagator.java
index 05ffa57..3f8cb7d 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/jul/LevelChangePropagator.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/jul/LevelChangePropagator.java
@@ -21,7 +21,9 @@ import ch.qos.logback.core.spi.ContextAwareBase;
 import ch.qos.logback.core.spi.LifeCycle;
 
 import java.util.Enumeration;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 import java.util.logging.LogManager;
 
 
@@ -30,8 +32,8 @@ import java.util.logging.LogManager;
  */
 public class LevelChangePropagator extends ContextAwareBase implements LoggerContextListener, LifeCycle {
 
+  private Set julLoggerSet = new HashSet();
   boolean isStarted = false;
-
   boolean resetJUL = false;
 
   public void setResetJUL(boolean resetJUL) {
@@ -58,6 +60,9 @@ public class LevelChangePropagator extends ContextAwareBase implements LoggerCon
   private void propagate(Logger logger, Level level) {
     addInfo("Propagating " + level + " level on " + logger + " onto the JUL framework");
     java.util.logging.Logger julLogger = JULHelper.asJULLogger(logger);
+    // prevent garbage collection of jul loggers levels were propagated to
+    // see also  http://jira.qos.ch/browse/LBCLASSIC-256
+    julLoggerSet.add(julLogger);
     java.util.logging.Level julLevel = JULHelper.asJULLevel(level);
     julLogger.setLevel(julLevel);
   }

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

Summary of changes:
 .../logback/classic/jul/LevelChangePropagator.java |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)


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


More information about the logback-dev mailing list