[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch master updated. v_1.0.1-2-g4bd6f46
Gitbot
git-noreply at pixie.qos.ch
Wed Mar 7 18:14:11 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 4bd6f468342d5d4eff28f3d56accf577066d1b60 (commit)
from 25758b57b37fe6c80f1b9c9217a60d3d1b98b2c2 (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=4bd6f468342d5d4eff28f3d56accf577066d1b60
http://github.com/ceki/logback/commit/4bd6f468342d5d4eff28f3d56accf577066d1b60
commit 4bd6f468342d5d4eff28f3d56accf577066d1b60
Author: Ceki Gulcu <ceki at qos.ch>
Date: Wed Mar 7 18:13:42 2012 +0100
started work on LBCORE-234
diff --git a/logback-access/src/main/java/ch/qos/logback/access/PatternLayout.java b/logback-access/src/main/java/ch/qos/logback/access/PatternLayout.java
index a895d18..279140a 100644
--- a/logback-access/src/main/java/ch/qos/logback/access/PatternLayout.java
+++ b/logback-access/src/main/java/ch/qos/logback/access/PatternLayout.java
@@ -63,6 +63,7 @@ import ch.qos.logback.core.pattern.parser.Parser;
public class PatternLayout extends PatternLayoutBase<IAccessEvent> {
public static final Map<String, String> defaultConverterMap = new HashMap<String, String>();
+ public static final String HEADER_PREFIX = "#logback.access pattern: ";
public static String CLF_PATTERN = "%h %l %u %t \"%r\" %s %b";
public static String CLF_PATTERN_NAME = "common";
@@ -184,4 +185,10 @@ public class PatternLayout extends PatternLayoutBase<IAccessEvent> {
}
super.start();
}
+
+
+ @Override
+ protected String getPresentationHeaderPrefix() {
+ return HEADER_PREFIX;
+ }
}
diff --git a/logback-classic/src/main/java/ch/qos/logback/classic/PatternLayout.java b/logback-classic/src/main/java/ch/qos/logback/classic/PatternLayout.java
index ef32df3..83d8e8b 100644
--- a/logback-classic/src/main/java/ch/qos/logback/classic/PatternLayout.java
+++ b/logback-classic/src/main/java/ch/qos/logback/classic/PatternLayout.java
@@ -58,7 +58,8 @@ import ch.qos.logback.core.pattern.parser.Parser;
public class PatternLayout extends PatternLayoutBase<ILoggingEvent> {
public static final Map<String, String> defaultConverterMap = new HashMap<String, String>();
-
+ public static final String HEADER_PREFIX = "#logback.classic pattern: ";
+
static {
defaultConverterMap.putAll(Parser.DEFAULT_COMPOSITE_CONVERTER_MAP);
@@ -145,4 +146,9 @@ public class PatternLayout extends PatternLayoutBase<ILoggingEvent> {
}
return writeLoopOnConverters(event);
}
+
+ @Override
+ protected String getPresentationHeaderPrefix() {
+ return HEADER_PREFIX;
+ }
}
diff --git a/logback-core/src/main/java/ch/qos/logback/core/pattern/PatternLayoutBase.java b/logback-core/src/main/java/ch/qos/logback/core/pattern/PatternLayoutBase.java
index cc1475b..07d8400 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/pattern/PatternLayoutBase.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/pattern/PatternLayoutBase.java
@@ -136,4 +136,14 @@ abstract public class PatternLayoutBase<E> extends LayoutBase<E> {
public Map<String, String> getInstanceConverterMap() {
return instanceConverterMap;
}
+
+
+ protected String getPresentationHeaderPrefix() {
+ return CoreConstants.EMPTY_STRING;
+ }
+
+ @Override
+ public String getPresentationHeader() {
+ return getPresentationHeaderPrefix()+pattern;
+ }
}
-----------------------------------------------------------------------
Summary of changes:
.../java/ch/qos/logback/access/PatternLayout.java | 7 +++++++
.../java/ch/qos/logback/classic/PatternLayout.java | 8 +++++++-
.../logback/core/pattern/PatternLayoutBase.java | 10 ++++++++++
3 files changed, 24 insertions(+), 1 deletions(-)
hooks/post-receive
--
Logback: the generic, reliable, fast and flexible logging framework.
More information about the logback-dev
mailing list