[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch master updated. v_1.0.1-7-g87fa86b
Gitbot
git-noreply at pixie.qos.ch
Wed Mar 14 23:15:27 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 87fa86b3f11844a8c15ed83d4a57e87214b3682e (commit)
from 94454601b654d4de8f836c27d192fed7613e7cf3 (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=87fa86b3f11844a8c15ed83d4a57e87214b3682e
http://github.com/ceki/logback/commit/87fa86b3f11844a8c15ed83d4a57e87214b3682e
commit 87fa86b3f11844a8c15ed83d4a57e87214b3682e
Author: Ceki Gulcu <ceki at qos.ch>
Date: Wed Mar 14 23:14:57 2012 +0100
ongoing work
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 5bf4705..d19d540 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 e756f08..0c6d660 100644
--- a/logback-classic/src/test/input/joran/rolling/basic.xml
+++ b/logback-classic/src/test/input/joran/rolling/basic.xml
@@ -10,8 +10,10 @@
</FileNamePattern>
</rollingPolicy>
<encoder>
- <Pattern>%msg%n</Pattern>
- <outputPatternAsPresentationHeader>false</outputPatternAsPresentationHeader>
+ <layout class="ch.qos.logback.classic.PatternLayout">
+ <pattern>%msg%n</pattern>
+ <outputPatternAsPresentationHeader>false</outputPatternAsPresentationHeader>
+ </layout>
</encoder>
</appender>
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/encoder/PatternLayoutEncoderTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/encoder/PatternLayoutEncoderTest.java
index 89f9b7a..bab8c26 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/encoder/PatternLayoutEncoderTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/encoder/PatternLayoutEncoderTest.java
@@ -19,6 +19,7 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.charset.Charset;
+import ch.qos.logback.classic.PatternLayout;
import org.junit.Before;
import org.junit.Test;
@@ -39,7 +40,6 @@ public class PatternLayoutEncoderTest {
@Before
public void setUp() {
ple.setPattern("%m");
- ple.setOutputPatternAsPresentationHeader(false);
ple.setContext(context);
}
@@ -49,8 +49,7 @@ public class PatternLayoutEncoderTest {
@Test
public void smoke() throws IOException {
- ple.start();
- ple.init(baos);
+ init(baos);
String msg = "hello";
ILoggingEvent event = makeLoggingEvent(msg);
ple.doEncode(event);
@@ -58,11 +57,16 @@ public class PatternLayoutEncoderTest {
assertEquals(msg, baos.toString());
}
+ void init(ByteArrayOutputStream baos) throws IOException {
+ ple.start();
+ ((PatternLayout) ple.getLayout()).setOutputPatternAsPresentationHeader(false);
+ ple.init(baos);
+ }
+
@Test
public void charset() throws IOException {
ple.setCharset(utf8Charset);
- ple.start();
- ple.init(baos);
+ init(baos);
String msg = "\u03b1";
ILoggingEvent event = makeLoggingEvent(msg);
ple.doEncode(event);
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/rolling/TimeBasedRollingWithConfigFileTest.java b/logback-classic/src/test/java/ch/qos/logback/classic/rolling/TimeBasedRollingWithConfigFileTest.java
index bb9bda4..949d255 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/rolling/TimeBasedRollingWithConfigFileTest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/rolling/TimeBasedRollingWithConfigFileTest.java
@@ -17,6 +17,7 @@ import static org.junit.Assert.assertTrue;
import java.util.Date;
+import ch.qos.logback.core.util.StatusPrinter;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -69,6 +70,7 @@ public class TimeBasedRollingWithConfigFileTest extends
loadConfig(ClassicTestConstants.JORAN_INPUT_PREFIX + "rolling/" + testId
+ ".xml");
StatusChecker sc = new StatusChecker(lc);
+ StatusPrinter.print(lc );
assertTrue(sc.isErrorFree(0));
Logger root = lc.getLogger(Logger.ROOT_LOGGER_NAME);
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 b68b76d..8df4d16 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
@@ -20,8 +20,8 @@ public class PatternLayoutEncoderBase<E> extends LayoutWrappingEncoder<E> {
String pattern;
- for reasons of consistency following attribute should be removed
- protected boolean outputPatternAsPresentationHeader = true;
+ //for reasons of consistency following attribute should be removed
+ //protected boolean outputPatternAsPresentationHeader = true;
public String getPattern() {
return pattern;
@@ -31,13 +31,7 @@ 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 ++++--
.../classic/encoder/PatternLayoutEncoderTest.java | 14 +++++++++-----
.../TimeBasedRollingWithConfigFileTest.java | 2 ++
.../core/pattern/PatternLayoutEncoderBase.java | 10 ++--------
5 files changed, 18 insertions(+), 16 deletions(-)
hooks/post-receive
--
Logback: the generic, reliable, fast and flexible logging framework.
More information about the logback-dev
mailing list