[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch master updated. v_1.0.1-8-gd0f927b
Gitbot
git-noreply at pixie.qos.ch
Thu Mar 15 14:49:39 CET 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 d0f927bea04ee1a3a22230a2899fdcd7b6d1f795 (commit)
from 87fa86b3f11844a8c15ed83d4a57e87214b3682e (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=d0f927bea04ee1a3a22230a2899fdcd7b6d1f795
http://github.com/ceki/logback/commit/d0f927bea04ee1a3a22230a2899fdcd7b6d1f795
commit d0f927bea04ee1a3a22230a2899fdcd7b6d1f795
Author: Ceki Gulcu <ceki at qos.ch>
Date: Thu Mar 15 14:49:06 2012 +0100
all tests pass
diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/encoder/PatternLayoutEncoder.java b/logback-classic/src/main/java/ch/qos/logback/classic/encoder/PatternLayoutEncoder.java
index d19d540..5bf4705 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/encoder/PatternLayoutEncoder.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/encoder/PatternLayoutEncoder.java
@@ -24,7 +24,7 @@ public class PatternLayoutEncoder extends PatternLayoutEncoderBase<ILoggingEvent
PatternLayout patternLayout = new PatternLayout();
patternLayout.setContext(context);
patternLayout.setPattern(getPattern());
- //patternLayout.setOutputPatternAsPresentationHeader(outputPatternAsPresentationHeader);
+ patternLayout.setOutputPatternAsPresentationHeader(outputPatternAsPresentationHeader);
patternLayout.start();
this.layout = patternLayout;
super.start();
diff --git a/logback-classic/src/test/input/joran/rolling/basic.xml b/logback-classic/src/test/input/joran/rolling/basic.xml
index 0c6d660..eb97e61 100644
--- a/logback-classic/src/test/input/joran/rolling/basic.xml
+++ b/logback-classic/src/test/input/joran/rolling/basic.xml
@@ -10,10 +10,8 @@
</FileNamePattern>
</rollingPolicy>
<encoder>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <pattern>%msg%n</pattern>
- <outputPatternAsPresentationHeader>false</outputPatternAsPresentationHeader>
- </layout>
+ <pattern>%msg%n</pattern>
+ <outputPatternAsPresentationHeader>false</outputPatternAsPresentationHeader>
</encoder>
</appender>
diff --git a/logback-core/src/main/java/ch/qos/logback/core/pattern/PatternLayoutEncoderBase.java b/logback-core/src/main/java/ch/qos/logback/core/pattern/PatternLayoutEncoderBase.java
index 8df4d16..eaccd55 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/pattern/PatternLayoutEncoderBase.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/pattern/PatternLayoutEncoderBase.java
@@ -19,9 +19,7 @@ import ch.qos.logback.core.encoder.LayoutWrappingEncoder;
public class PatternLayoutEncoderBase<E> extends LayoutWrappingEncoder<E> {
String pattern;
-
- //for reasons of consistency following attribute should be removed
- //protected boolean outputPatternAsPresentationHeader = true;
+ protected boolean outputPatternAsPresentationHeader = true;
public String getPattern() {
return pattern;
@@ -31,7 +29,13 @@ public class PatternLayoutEncoderBase<E> extends LayoutWrappingEncoder<E> {
this.pattern = pattern;
}
+ public boolean isOutputPatternAsPresentationHeader() {
+ return outputPatternAsPresentationHeader;
+ }
+ public void setOutputPatternAsPresentationHeader(boolean outputPatternAsPresentationHeader) {
+ this.outputPatternAsPresentationHeader = outputPatternAsPresentationHeader;
+ }
@Override
public void setLayout(Layout<E> layout) {
-----------------------------------------------------------------------
Summary of changes:
.../classic/encoder/PatternLayoutEncoder.java | 2 +-
.../src/test/input/joran/rolling/basic.xml | 6 ++----
.../core/pattern/PatternLayoutEncoderBase.java | 10 +++++++---
3 files changed, 10 insertions(+), 8 deletions(-)
hooks/post-receive
--
Logback: the generic, reliable, fast and flexible logging framework.
More information about the logback-dev
mailing list