[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. v_0.9.24-28-g7480e33
added by portage for gitosis-gentoo
git-noreply at pixie.qos.ch
Wed Oct 13 19:49:55 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 7480e3375fa4b7e22c3c5a96bf56867b48ce46bc (commit)
from e519c39a35da84d83a8c5121490551473d6f92fa (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=7480e3375fa4b7e22c3c5a96bf56867b48ce46bc
http://github.com/ceki/logback/commit/7480e3375fa4b7e22c3c5a96bf56867b48ce46bc
commit 7480e3375fa4b7e22c3c5a96bf56867b48ce46bc
Author: Ceki Gulcu <ceki at qos.ch>
Date: Wed Oct 13 19:48:54 2010 +0200
fixing LBCLASSIC-224
diff --git a/logback-classic/src/test/input/joran/appenderRefByProperty.xml b/logback-classic/src/test/input/joran/appenderRefByProperty.xml
new file mode 100644
index 0000000..8e9d0b9
--- /dev/null
+++ b/logback-classic/src/test/input/joran/appenderRefByProperty.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration>
+
+<configuration debug="false">
+
+ <appender name="A" class="ch.qos.logback.core.read.ListAppender"/>
+ <appender name="B" class="ch.qos.logback.core.read.ListAppender"/>
+
+ <logger name="ch.qos.logback.classic.joran" level="INFO">
+ <appender-ref ref="${logback.appenderRef}"/>
+ </logger>
+
+ <root level="ERROR">
+ <appender-ref ref="LIST"/>
+ </root>
+
+</configuration>
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/joran/JoranConfiguratorTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/joran/JoranConfiguratorTest.java
index 8f82d6c..5cebca1 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/joran/JoranConfiguratorTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/joran/JoranConfiguratorTest.java
@@ -85,7 +85,7 @@ public class JoranConfiguratorTest {
System.setProperty(propertyName, "INFO");
configure(ClassicTestConstants.JORAN_INPUT_PREFIX
- + "rootLevelByProperty.xml");
+ + "rootLevelByProperty.xml");
// StatusPrinter.print(loggerContext);
ListAppender listAppender = (ListAppender) root.getAppender("LIST");
assertEquals(0, listAppender.list.size());
@@ -101,7 +101,7 @@ public class JoranConfiguratorTest {
System.setProperty(propertyName, "DEBUG");
configure(ClassicTestConstants.JORAN_INPUT_PREFIX
- + "loggerLevelByProperty.xml");
+ + "loggerLevelByProperty.xml");
// StatusPrinter.print(loggerContext);
ListAppender listAppender = (ListAppender) root.getAppender("LIST");
assertEquals(0, listAppender.list.size());
@@ -112,6 +112,22 @@ public class JoranConfiguratorTest {
}
@Test
+ public void appenderRefSettingBySystemProperty() throws JoranException {
+ final String propertyName = "logback.appenderRef";
+ System.setProperty(propertyName, "A");
+ configure(ClassicTestConstants.JORAN_INPUT_PREFIX
+ + "appenderRefByProperty.xml");
+ final Logger logger = loggerContext
+ .getLogger("ch.qos.logback.classic.joran");
+ final ListAppender listAppender = (ListAppender) logger.getAppender("A");
+ assertEquals(0, listAppender.list.size());
+ final String msg = "hello world";
+ logger.info(msg);
+ assertEquals(1, listAppender.list.size());
+ System.clearProperty(propertyName);
+ }
+
+ @Test
public void statusListener() throws JoranException {
configure(ClassicTestConstants.JORAN_INPUT_PREFIX + "statusListener.xml");
// StatusPrinter.print(loggerContext);
@@ -133,7 +149,7 @@ public class JoranConfiguratorTest {
logger.debug(msg);
StringListAppender<ILoggingEvent> slAppender = (StringListAppender<ILoggingEvent>) loggerContext
- .getLogger("root").getAppender("STR_LIST");
+ .getLogger("root").getAppender("STR_LIST");
assertNotNull(slAppender);
assertEquals(2, slAppender.strList.size());
assertTrue(slAppender.strList.get(0).contains(" DEBUG - toto"));
@@ -181,7 +197,7 @@ public class JoranConfiguratorTest {
@SuppressWarnings("unchecked")
ListAppender<ILoggingEvent> listAppender = (ListAppender) root
- .getAppender("LIST");
+ .getAppender("LIST");
assertNotNull(listAppender);
assertEquals(1, listAppender.list.size());
@@ -201,7 +217,7 @@ public class JoranConfiguratorTest {
@SuppressWarnings("unchecked")
ListAppender<ILoggingEvent> listAppender = (ListAppender) root
- .getAppender("LIST");
+ .getAppender("LIST");
assertNotNull(listAppender);
assertEquals(1, listAppender.list.size());
@@ -213,7 +229,7 @@ public class JoranConfiguratorTest {
@Test
public void testTurboDynamicThreshold() throws JoranException {
configure(ClassicTestConstants.JORAN_INPUT_PREFIX
- + "turboDynamicThreshold.xml");
+ + "turboDynamicThreshold.xml");
ListAppender listAppender = (ListAppender) root.getAppender("LIST");
assertEquals(0, listAppender.list.size());
@@ -233,7 +249,7 @@ public class JoranConfiguratorTest {
@Test
public void testTurboDynamicThreshold2() throws JoranException {
configure(ClassicTestConstants.JORAN_INPUT_PREFIX
- + "turboDynamicThreshold2.xml");
+ + "turboDynamicThreshold2.xml");
ListAppender listAppender = (ListAppender) root.getAppender("LIST");
assertEquals(0, listAppender.list.size());
@@ -260,7 +276,7 @@ public class JoranConfiguratorTest {
public void scan1() throws JoranException, IOException, InterruptedException {
String configFileAsStr = ClassicTestConstants.JORAN_INPUT_PREFIX
- + "scan1.xml";
+ + "scan1.xml";
configure(configFileAsStr);
File file = new File(configFileAsStr);
@@ -280,10 +296,10 @@ public class JoranConfiguratorTest {
@Test
public void timestamp() throws JoranException, IOException,
- InterruptedException {
+ InterruptedException {
String configFileAsStr = ClassicTestConstants.JORAN_INPUT_PREFIX
- + "timestamp.xml";
+ + "timestamp.xml";
configure(configFileAsStr);
String r = loggerContext.getProperty("testTimestamp");
@@ -295,30 +311,30 @@ public class JoranConfiguratorTest {
@Test
public void encoderCharset() throws JoranException, IOException,
- InterruptedException {
+ InterruptedException {
String configFileAsStr = ClassicTestConstants.JORAN_INPUT_PREFIX
- + "encoderCharset.xml";
+ + "encoderCharset.xml";
configure(configFileAsStr);
-
+
ConsoleAppender<ILoggingEvent> consoleAppender = (ConsoleAppender<ILoggingEvent>) root.getAppender("CONSOLE");
assertNotNull(consoleAppender);
LayoutWrappingEncoder<ILoggingEvent> encoder = (LayoutWrappingEncoder<ILoggingEvent>) consoleAppender.getEncoder();
-
+
assertEquals("UTF-8", encoder.getCharset().displayName());
-
+
StatusChecker checker = new StatusChecker(loggerContext);
- assertTrue(checker.isErrorFree());
+ assertTrue(checker.isErrorFree());
}
void verifyJULLevel(String loggerName, Level expectedLevel) {
- LogManager lm = LogManager.getLogManager();
+ LogManager lm = LogManager.getLogManager();
java.util.logging.Logger julLogger = JULHelper.asJULLogger(loggerName);
java.util.logging.Level julLevel = julLogger.getLevel();
- if(expectedLevel == null) {
+ if (expectedLevel == null) {
assertNull(julLevel);
} else {
assertEquals(JULHelper.asJULLevel(expectedLevel), julLevel);
@@ -329,13 +345,13 @@ public class JoranConfiguratorTest {
@Test
public void levelChangePropagator0() throws JoranException, IOException,
- InterruptedException {
+ InterruptedException {
java.util.logging.Logger.getLogger("xx").setLevel(java.util.logging.Level.INFO);
String configFileAsStr = ClassicTestConstants.JORAN_INPUT_PREFIX
- + "/jul/levelChangePropagator0.xml";
+ + "/jul/levelChangePropagator0.xml";
configure(configFileAsStr);
StatusChecker checker = new StatusChecker(loggerContext);
- assertTrue(checker.isErrorFree());
+ assertTrue(checker.isErrorFree());
verifyJULLevel("xx", null);
verifyJULLevel("a.b.c", Level.WARN);
verifyJULLevel(Logger.ROOT_LOGGER_NAME, Level.TRACE);
@@ -343,10 +359,10 @@ public class JoranConfiguratorTest {
@Test
public void levelChangePropagator1() throws JoranException, IOException,
- InterruptedException {
+ InterruptedException {
java.util.logging.Logger.getLogger("xx").setLevel(java.util.logging.Level.INFO);
String configFileAsStr = ClassicTestConstants.JORAN_INPUT_PREFIX
- + "/jul/levelChangePropagator1.xml";
+ + "/jul/levelChangePropagator1.xml";
configure(configFileAsStr);
StatusChecker checker = new StatusChecker(loggerContext);
assertTrue(checker.isErrorFree());
diff --git a/logback-core/src/main/java/ch/qos/logback/core/joran/action/AppenderRefAction.java b/logback-core/src/main/java/ch/qos/logback/core/joran/action/AppenderRefAction.java
index 8923f3b..7e82bbb 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/joran/action/AppenderRefAction.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/joran/action/AppenderRefAction.java
@@ -46,7 +46,7 @@ public class AppenderRefAction extends Action {
AppenderAttachable appenderAttachable = (AppenderAttachable) o;
- String appenderName = attributes.getValue(ActionConst.REF_ATTRIBUTE);
+ String appenderName = ec.subst(attributes.getValue(ActionConst.REF_ATTRIBUTE));
if (OptionHelper.isEmpty(appenderName)) {
// print a meaningful error message and return
diff --git a/logback-site/src/site/pages/index.html b/logback-site/src/site/pages/index.html
index f8e3d00..36df255 100644
--- a/logback-site/src/site/pages/index.html
+++ b/logback-site/src/site/pages/index.html
@@ -82,18 +82,19 @@
<li><a href="http://code.google.com/p/openmeetings/">OpenMeetings</a></li>
<li><a href="http://liftweb.net/">Lift</a></li>
<li><a href="http://www.red5.org">Red5</a></li>
+ <li><a href="http://scalate.fusesource.org/">Scalate</a></li>
</ul>
</td>
<td valign="top">
<ul>
- <li><a href="http://scalate.fusesource.org/">Scalate</a></li>
<li><a href="http://shibboleth.internet2.edu/">Shibboleth</a></li>
<li><a href="http://sonar.codehaus.org/">Sonar</a></li>
<li><a
href="http://static.springsource.org/s2-dmserver/2.0.x/user-guide/htmlsingle/user-guide.html">SpringSource
dm Server</a></li>
<li><a href="http://www.streambase.com/developers/docs/latest/index.html">StreamBase</a></li>
+ <li><a href="http://www.eclipse.org/virgo/">Virgo Web Server</a></li>
<li><a href="http://www.xuggle.com/xuggler/">Xuggler</a></li>
</ul>
</td>
diff --git a/logback-site/src/site/pages/news.html b/logback-site/src/site/pages/news.html
index 1e636a1..63a3e51 100644
--- a/logback-site/src/site/pages/news.html
+++ b/logback-site/src/site/pages/news.html
@@ -28,6 +28,25 @@
<hr width="80%" align="center" />
+ <h3>October 13th, 2010 - Release of version 0.9.25</h3>
+
+ <p>Logback-classic now supports <a
+ href="manual/configuration.html#LevelChangePropagator">propagation
+ of level changes from logback-classic onto the
+ j.u.l. framework</a>. This significantly reduces the performance
+ impact of disabled log statements making it reasonable for
+ real-world applications to use the <a
+ href="http://slf4j.org/legacy.html#jul-to-slf4j">jul-to-slf4j
+ bridge</a>.
+ </p>
+
+ <p>The <code><appender-ref></code> element now supports
+ <a href="manual/configuration.html#variableSubstitution">variable substitution</a>, thus fixing <a
+ href="http://jira.qos.ch/browse/LBCLASSIC-224">LBCLASSIC-224</a>
+ as reported by David Harrigan.
+
+ <hr width="80%" align="center" />
+
<h3>June 30th, 2010 - Release of version 0.9.24</h3>
<p>Fixed NullPointerException thrown by
-----------------------------------------------------------------------
Summary of changes:
.../src/test/input/joran/appenderRefByProperty.xml | 17 +++++
.../classic/joran/JoranConfiguratorTest.java | 62 ++++++++++++-------
.../core/joran/action/AppenderRefAction.java | 2 +-
logback-site/src/site/pages/index.html | 3 +-
logback-site/src/site/pages/news.html | 19 ++++++
5 files changed, 78 insertions(+), 25 deletions(-)
create mode 100644 logback-classic/src/test/input/joran/appenderRefByProperty.xml
hooks/post-receive
--
Logback: the generic, reliable, fast and flexible logging framework.
More information about the logback-dev
mailing list