[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch master updated. v_1.0.2-6-gd903644
Gitbot
git-noreply at pixie.qos.ch
Thu May 3 18:28:58 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 d903644be47ceaf38b437a921c3163a2335d9d5e (commit)
from df62eebfa7bbd7053a84aca740ed8aa63c548315 (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=d903644be47ceaf38b437a921c3163a2335d9d5e
http://github.com/ceki/logback/commit/d903644be47ceaf38b437a921c3163a2335d9d5e
commit d903644be47ceaf38b437a921c3163a2335d9d5e
Author: Ceki Gulcu <ceki at qos.ch>
Date: Thu May 3 18:27:57 2012 +0200
Fix http://jira.qos.ch/browse/LBCLASSIC-256
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/jul/LevelChangePropagatorTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/jul/LevelChangePropagatorTest.java
index 9f6fc56..ddfe00c 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/jul/LevelChangePropagatorTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/jul/LevelChangePropagatorTest.java
@@ -16,12 +16,14 @@ package ch.qos.logback.classic.jul;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;
import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.core.testUtil.RandomUtil;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class LevelChangePropagatorTest {
+ int rand = RandomUtil.getPositiveInt();
LoggerContext loggerContext = new LoggerContext();
LevelChangePropagator levelChangePropagator = new LevelChangePropagator();
@@ -38,15 +40,12 @@ public class LevelChangePropagatorTest {
java.util.logging.Level julLevel = JULHelper.asJULLevel(level);
assertEquals(julLevel, julLogger.getLevel());
-
-
}
@Test
public void smoke() {
checkLevelChange("a", Level.INFO);
checkLevelChange("a.b", Level.DEBUG);
-
}
@Test
@@ -54,4 +53,17 @@ public class LevelChangePropagatorTest {
checkLevelChange(Logger.ROOT_LOGGER_NAME, Level.TRACE);
}
+ // see http://jira.qos.ch/browse/LBCLASSIC-256
+ @Test
+ public void gc() {
+ Logger logger = loggerContext.getLogger("gc"+rand);
+ logger.setLevel(Level.INFO);
+ // invoke GC so that the relevant julLogger can be garbage collected.
+ System.gc();
+ java.util.logging.Logger julLogger = JULHelper.asJULLogger(logger);
+ java.util.logging.Level julLevel = JULHelper.asJULLevel(Level.INFO);
+
+ assertEquals(julLevel, julLogger.getLevel());
+ }
+
}
-----------------------------------------------------------------------
Summary of changes:
.../classic/jul/LevelChangePropagatorTest.java | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
hooks/post-receive
--
Logback: the generic, reliable, fast and flexible logging framework.
More information about the logback-dev
mailing list