[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. v_0.9.25-21-gc256b23
added by portage for gitosis-gentoo
git-noreply at pixie.qos.ch
Thu Nov 4 22:31:24 CET 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 c256b231bf79b9518333cf56d77d48944a8d3b9c (commit)
from 6a2c98fea1dbb7c864d3b13c502ff5ee72638b16 (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=c256b231bf79b9518333cf56d77d48944a8d3b9c
http://github.com/ceki/logback/commit/c256b231bf79b9518333cf56d77d48944a8d3b9c
commit c256b231bf79b9518333cf56d77d48944a8d3b9c
Author: Ceki Gulcu <ceki at qos.ch>
Date: Thu Nov 4 22:30:10 2010 +0100
avoid polluting the output for default additity, added a test case
diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/LoggerAction.java b/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/LoggerAction.java
index f99b651..5ed8cc3 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/LoggerAction.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/joran/action/LoggerAction.java
@@ -67,9 +67,9 @@ public class LoggerAction extends Action {
}
}
- if (!OptionHelper.isEmpty(ActionConst.ADDITIVITY_ATTRIBUTE)) {
- boolean additive = OptionHelper.toBoolean(attributes
- .getValue(ActionConst.ADDITIVITY_ATTRIBUTE), true);
+ String additivityStr = ec.subst(attributes.getValue(ActionConst.ADDITIVITY_ATTRIBUTE));
+ if (!OptionHelper.isEmpty(additivityStr)) {
+ boolean additive = OptionHelper.toBoolean(additivityStr, true);
addInfo("Setting additivity of logger [" + loggerName + "] to "
+ additive);
logger.setAdditive(additive);
diff --git a/logback-classic/src/test/input/joran/additivity.xml b/logback-classic/src/test/input/joran/additivity.xml
new file mode 100644
index 0000000..08dedd3
--- /dev/null
+++ b/logback-classic/src/test/input/joran/additivity.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration>
+
+<configuration debug="false">
+ <logger name="additivityTest" level="DEBUG" additivity="false"/>
+</configuration>
diff --git a/logback-classic/src/test/input/joran/loggerLevelByProperty.xml b/logback-classic/src/test/input/joran/loggerLevelByProperty.xml
index 10aa939..eb6e92b 100644
--- a/logback-classic/src/test/input/joran/loggerLevelByProperty.xml
+++ b/logback-classic/src/test/input/joran/loggerLevelByProperty.xml
@@ -5,7 +5,7 @@
<appender name="LIST" class="ch.qos.logback.core.read.ListAppender" />
- <logger name="ch.qos.logback.classic.joran" level="${logback.level}" />
+ <logger name="ch.qos.logback.classic.joran" level="${logback.level}"/>
<root level="ERROR">
<appender-ref ref="LIST" />
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 26e7555..4fbbf58 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
@@ -81,6 +81,13 @@ public class JoranConfiguratorTest {
}
@Test
+ public void additivity() throws JoranException {
+ configure(ClassicTestConstants.JORAN_INPUT_PREFIX + "additivity.xml");
+ Logger logger = loggerContext.getLogger("additivityTest");
+ assertFalse(logger.isAdditive());
+ }
+
+ @Test
public void rootLoggerLevelSettingBySystemProperty() throws JoranException {
String propertyName = "logback.level";
@@ -99,7 +106,6 @@ public class JoranConfiguratorTest {
@Test
public void loggerLevelSettingBySystemProperty() throws JoranException {
String propertyName = "logback.level";
-
System.setProperty(propertyName, "DEBUG");
configure(ClassicTestConstants.JORAN_INPUT_PREFIX
+ "loggerLevelByProperty.xml");
-----------------------------------------------------------------------
Summary of changes:
.../logback/classic/joran/action/LoggerAction.java | 6 +++---
.../src/test/input/joran/additivity.xml | 6 ++++++
.../src/test/input/joran/loggerLevelByProperty.xml | 2 +-
.../classic/joran/JoranConfiguratorTest.java | 8 +++++++-
4 files changed, 17 insertions(+), 5 deletions(-)
create mode 100644 logback-classic/src/test/input/joran/additivity.xml
hooks/post-receive
--
Logback: the generic, reliable, fast and flexible logging framework.
More information about the logback-dev
mailing list