[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, encoder, updated. v0.9.18-46-gbf22544
added by portage for gitosis-gentoo
git-noreply at pixie.qos.ch
Tue Feb 23 23:59:52 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, encoder has been updated
via bf2254414040e25408df3b469ea4b6decd01f304 (commit)
from de7d9343186256b18e4419302923ff024022e638 (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=bf2254414040e25408df3b469ea4b6decd01f304
http://github.com/ceki/logback/commit/bf2254414040e25408df3b469ea4b6decd01f304
commit bf2254414040e25408df3b469ea4b6decd01f304
Author: Ceki Gulcu <ceki at qos.ch>
Date: Tue Feb 23 23:58:56 2010 +0100
- chapter3 renamed to chapters.configuration
- FileAppender now takes an encoder and not a layout
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 f5af9a6..a709655 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
@@ -1,3 +1,16 @@
+/**
+ * Logback: the reliable, generic, fast and flexible logging framework.
+ * Copyright (C) 1999-2010, QOS.ch. All rights reserved.
+ *
+ * This program and the accompanying materials are dual-licensed under either
+ * the terms of the Eclipse Public License v1.0 as published by the Eclipse
+ * Foundation
+ *
+ * or (per the licensee's choosing)
+ *
+ * under the terms of the GNU Lesser General Public License version 2.1 as
+ * published by the Free Software Foundation.
+ */
package ch.qos.logback.classic.encoder;
import ch.qos.logback.classic.PatternLayout;
diff --git a/logback-examples/src/main/java/chapters/configuration/additivityFlag.xml b/logback-examples/src/main/java/chapters/configuration/additivityFlag.xml
index 40e67c1..c5bd787 100644
--- a/logback-examples/src/main/java/chapters/configuration/additivityFlag.xml
+++ b/logback-examples/src/main/java/chapters/configuration/additivityFlag.xml
@@ -1,21 +1,22 @@
<configuration>
- <appender name="FILE"class="ch.qos.logback.core.FileAppender">
- <file>foo.log</file>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>
- %date %level [%thread] %logger{10} [%file : %line] %msg%n
- </Pattern>
- </layout>
+ <appender name="FILE"
+ class="ch.qos.logback.core.FileAppender">
+ <file>foo.log</file>
+ <encoder>
+ <Pattern>
+ %date %level [%thread] %logger{10} [%file : %line] %msg%n
+ </Pattern>
+ </encoder>
</appender>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
+ <encoder>
<Pattern>%msg%n</Pattern>
- </layout>
+ </encoder>
</appender>
- <logger name="chapter3.Foo" additivity="false">
+ <logger name="chapters.configuration.Foo" additivity="false">
<appender-ref ref="FILE" />
</logger>
diff --git a/logback-examples/src/main/java/chapters/configuration/contextName.xml b/logback-examples/src/main/java/chapters/configuration/contextName.xml
index adaf1ec..a8c7ba8 100644
--- a/logback-examples/src/main/java/chapters/configuration/contextName.xml
+++ b/logback-examples/src/main/java/chapters/configuration/contextName.xml
@@ -3,9 +3,9 @@
<contextName>myAppName</contextName>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
+ <encoder>
<Pattern>%d %contextName [%t] %level %logger{36} - %msg%n</Pattern>
- </layout>
+ </encoder>
</appender>
<root level="debug">
diff --git a/logback-examples/src/main/java/chapters/configuration/duplicate.xml b/logback-examples/src/main/java/chapters/configuration/duplicate.xml
index 7672e7a..057510b 100644
--- a/logback-examples/src/main/java/chapters/configuration/duplicate.xml
+++ b/logback-examples/src/main/java/chapters/configuration/duplicate.xml
@@ -2,14 +2,14 @@
<appender name="STDOUT"
class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>
+ <encoder>
+ <pattern>
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
- </Pattern>
- </layout>
+ </pattern>
+ </encoder>
</appender>
- <logger name="chapter3">
+ <logger name="chapters.configuration">
<appender-ref ref="STDOUT" />
</logger>
diff --git a/logback-examples/src/main/java/chapters/configuration/includedConfig.xml b/logback-examples/src/main/java/chapters/configuration/includedConfig.xml
index 2e9a9a1..7096250 100644
--- a/logback-examples/src/main/java/chapters/configuration/includedConfig.xml
+++ b/logback-examples/src/main/java/chapters/configuration/includedConfig.xml
@@ -3,9 +3,11 @@
<included>
<appender name="includedConsole" class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
+ <!-- encoders are assigned by default the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
+ <encoder>
<param name="Pattern" value="%d - %m%n" />
- </layout>
+ </encoder>
</appender>
</included>
\ No newline at end of file
diff --git a/logback-examples/src/main/java/chapters/configuration/insertFromJNDI.xml b/logback-examples/src/main/java/chapters/configuration/insertFromJNDI.xml
index a6fe61f..1a7f642 100644
--- a/logback-examples/src/main/java/chapters/configuration/insertFromJNDI.xml
+++ b/logback-examples/src/main/java/chapters/configuration/insertFromJNDI.xml
@@ -5,9 +5,11 @@
<contextName>${appName}</contextName>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%d %contextName %level %msg %logger{50}%n</Pattern>
- </layout>
+ <!-- encoders are assigned by default the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
+ <encoder>
+ <pattern>%d %contextName %level %msg %logger{50}%n</pattern>
+ </encoder>
</appender>
<root level="DEBUG">
diff --git a/logback-examples/src/main/java/chapters/configuration/multiple.xml b/logback-examples/src/main/java/chapters/configuration/multiple.xml
index 50335eb..d764484 100644
--- a/logback-examples/src/main/java/chapters/configuration/multiple.xml
+++ b/logback-examples/src/main/java/chapters/configuration/multiple.xml
@@ -1,15 +1,17 @@
<configuration>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>myApp.log</file>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</Pattern>
- </layout>
+ <!-- encoders are assigned by default the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
+ <encoder>
+ <pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</pattern>
+ </encoder>
</appender>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%msg%n</pattern>
+ </encoder>
</appender>
<root level="debug">
diff --git a/logback-examples/src/main/java/chapters/configuration/onConsoleStatusListener.xml b/logback-examples/src/main/java/chapters/configuration/onConsoleStatusListener.xml
index 5d8ac87..ad2d8c5 100644
--- a/logback-examples/src/main/java/chapters/configuration/onConsoleStatusListener.xml
+++ b/logback-examples/src/main/java/chapters/configuration/onConsoleStatusListener.xml
@@ -5,11 +5,13 @@
<statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" />
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>
+ <!-- encoders are assigned by default the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
+ <encoder>
+ <pattern>
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
- </Pattern>
- </layout>
+ </pattern>
+ </encoder>
</appender>
<root level="debug">
diff --git a/logback-examples/src/main/java/chapters/configuration/restricted.xml b/logback-examples/src/main/java/chapters/configuration/restricted.xml
index e696b38..19b06c3 100644
--- a/logback-examples/src/main/java/chapters/configuration/restricted.xml
+++ b/logback-examples/src/main/java/chapters/configuration/restricted.xml
@@ -2,18 +2,20 @@
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>myApp.log</file>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</Pattern>
- </layout>
+ <!-- encoders are assigned by default the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
+ <encoder>
+ <pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</pattern>
+ </encoder>
</appender>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%msg%n</pattern>
+ </encoder>
</appender>
- <logger name="chapter3">
+ <logger name="chapters.configuration">
<appender-ref ref="FILE" />
</logger>
diff --git a/logback-examples/src/main/java/chapters/configuration/sample0.xml b/logback-examples/src/main/java/chapters/configuration/sample0.xml
index af6ab9f..b1c84c3 100644
--- a/logback-examples/src/main/java/chapters/configuration/sample0.xml
+++ b/logback-examples/src/main/java/chapters/configuration/sample0.xml
@@ -3,9 +3,11 @@
<appender name="STDOUT"
class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>
- </layout>
+ <!-- encoders are assigned by default the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
+ </encoder>
</appender>
<root level="debug">
diff --git a/logback-examples/src/main/java/chapters/configuration/sample1.xml b/logback-examples/src/main/java/chapters/configuration/sample1.xml
index 6a1612c..cbf6197 100644
--- a/logback-examples/src/main/java/chapters/configuration/sample1.xml
+++ b/logback-examples/src/main/java/chapters/configuration/sample1.xml
@@ -1,15 +1,17 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<configuration debug="true">
-
- <appender name="STDOUT"
- class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>
- </layout>
- </appender>
-
- <root level="debug">
- <appender-ref ref="STDOUT" />
- </root>
-</configuration>
-
+<?xml version="1.0" encoding="UTF-8" ?>
+<configuration debug="true">
+
+ <appender name="STDOUT"
+ class="ch.qos.logback.core.ConsoleAppender">
+ <!-- encoders are assigned by default the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <root level="debug">
+ <appender-ref ref="STDOUT" />
+ </root>
+</configuration>
+
diff --git a/logback-examples/src/main/java/chapters/configuration/sample2.xml b/logback-examples/src/main/java/chapters/configuration/sample2.xml
index 5f12f63..2a00f36 100644
--- a/logback-examples/src/main/java/chapters/configuration/sample2.xml
+++ b/logback-examples/src/main/java/chapters/configuration/sample2.xml
@@ -2,15 +2,17 @@
<configuration>
<appender name="STDOUT"
- class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>
- %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
- </Pattern>
- </layout>
+ class="ch.qos.logback.core.ConsoleAppender">
+ <!-- encoders are assigned by default the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
+ <encoder>
+ <pattern>
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+ </pattern>
+ </encoder>
</appender>
- <logger name="chapter3" level="INFO" />
+ <logger name="chapters.configuration" level="INFO" />
<!-- Strictly speaking, the level attribute is not necessary since -->
<!-- the level of the root level is set to DEBUG by default. -->
diff --git a/logback-examples/src/main/java/chapters/configuration/sample3.xml b/logback-examples/src/main/java/chapters/configuration/sample3.xml
index 874d80f..e19bfb4 100644
--- a/logback-examples/src/main/java/chapters/configuration/sample3.xml
+++ b/logback-examples/src/main/java/chapters/configuration/sample3.xml
@@ -2,17 +2,20 @@
<configuration>
<appender name="STDOUT"
- class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>
+ class="ch.qos.logback.core.ConsoleAppender">
+
+ <!-- encoders are assigned by default the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
+ <encoder>
+ <pattern>
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
- </Pattern>
- </layout>
- </appender>
+ </pattern>
+ </encoder>
+ </appender>
- <logger name="chapter3" level="INFO" />
+ <logger name="chapters.configuration" level="INFO" />
- <logger name="chapter3.Foo" level="DEBUG" />
+ <logger name="chapters.configuration.Foo" level="DEBUG" />
<root level="DEBUG">
<appender-ref ref="STDOUT" />
diff --git a/logback-examples/src/main/java/chapters/configuration/sample4.xml b/logback-examples/src/main/java/chapters/configuration/sample4.xml
index c9873d5..a6886aa 100644
--- a/logback-examples/src/main/java/chapters/configuration/sample4.xml
+++ b/logback-examples/src/main/java/chapters/configuration/sample4.xml
@@ -3,14 +3,16 @@
<appender name="STDOUT"
class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>
- %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
- </Pattern>
- </layout>
- </appender>
+ <!-- encoders are assigned by default the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
+ <encoder>
+ <pattern>
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+ </pattern>
+ </encoder>
+ </appender>
- <logger name="chapter3" level="INFO" />
+ <logger name="chapters.configuration" level="INFO" />
<root level="OFF">
<appender-ref ref="STDOUT" />
diff --git a/logback-examples/src/main/java/chapters/configuration/scan1.xml b/logback-examples/src/main/java/chapters/configuration/scan1.xml
index 600b8e0..1c8ff0f 100644
--- a/logback-examples/src/main/java/chapters/configuration/scan1.xml
+++ b/logback-examples/src/main/java/chapters/configuration/scan1.xml
@@ -3,9 +3,11 @@
<configuration scan="true">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <layout>
- <Pattern>%d [%thread] %-5level %logger{36} - %msg%n</Pattern>
- </layout>
+ <!-- encoders are assigned by default the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
+ <encoder>
+ <pattern>%d [%thread] %-5level %logger{36} - %msg%n</pattern>
+ </encoder>
</appender>
<root level="debug">
diff --git a/logback-examples/src/main/java/chapters/configuration/scan2.xml b/logback-examples/src/main/java/chapters/configuration/scan2.xml
index 24369f2..9c73997 100644
--- a/logback-examples/src/main/java/chapters/configuration/scan2.xml
+++ b/logback-examples/src/main/java/chapters/configuration/scan2.xml
@@ -3,9 +3,9 @@
<configuration scan="true" scanPeriod="30 seconds">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <layout>
- <Pattern>%d [%thread] %-5level %logger{36} - %msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%d [%thread] %-5level %logger{36} - %msg%n</pattern>
+ </encoder>
</appender>
<root level="debug">
diff --git a/logback-examples/src/main/java/chapters/configuration/variableSubstitution1.xml b/logback-examples/src/main/java/chapters/configuration/variableSubstitution1.xml
index ff6b80d..79543ee 100644
--- a/logback-examples/src/main/java/chapters/configuration/variableSubstitution1.xml
+++ b/logback-examples/src/main/java/chapters/configuration/variableSubstitution1.xml
@@ -4,9 +4,9 @@
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>${USER_HOME}/myApp.log</file>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%msg%n</pattern>
+ </encoder>
</appender>
<root level="debug">
diff --git a/logback-examples/src/main/java/chapters/configuration/variableSubstitution2.xml b/logback-examples/src/main/java/chapters/configuration/variableSubstitution2.xml
index 5faa695..c2bc57a 100644
--- a/logback-examples/src/main/java/chapters/configuration/variableSubstitution2.xml
+++ b/logback-examples/src/main/java/chapters/configuration/variableSubstitution2.xml
@@ -2,9 +2,9 @@
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>${USER_HOME}/myApp.log</file>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%msg%n</pattern>
+ </encoder>
</appender>
<root level="debug">
diff --git a/logback-examples/src/main/java/chapters/configuration/variableSubstitution3.xml b/logback-examples/src/main/java/chapters/configuration/variableSubstitution3.xml
index 481b477..10d9643 100644
--- a/logback-examples/src/main/java/chapters/configuration/variableSubstitution3.xml
+++ b/logback-examples/src/main/java/chapters/configuration/variableSubstitution3.xml
@@ -4,9 +4,9 @@
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>${USER_HOME}/myApp.log</file>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%msg%n</pattern>
+ </encoder>
</appender>
<root level="debug">
diff --git a/logback-examples/src/main/java/chapters/configuration/variableSubstitution4.xml b/logback-examples/src/main/java/chapters/configuration/variableSubstitution4.xml
index 2c056d0..361eb57 100644
--- a/logback-examples/src/main/java/chapters/configuration/variableSubstitution4.xml
+++ b/logback-examples/src/main/java/chapters/configuration/variableSubstitution4.xml
@@ -4,9 +4,9 @@
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>${destination}/myApp.log</file>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%msg%n</pattern>
+ </encoder>
</appender>
<root level="debug">
diff --git a/logback-site/src/site/pages/manual/configuration.html b/logback-site/src/site/pages/manual/configuration.html
index ae25f6e..b54ab09 100644
--- a/logback-site/src/site/pages/manual/configuration.html
+++ b/logback-site/src/site/pages/manual/configuration.html
@@ -240,9 +240,11 @@ public class Foo {
<pre class="prettyprint source"><configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>
- </layout>
+ <!-- encoders are by default assigned the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
+ </encoder>
</appender>
<root level="debug">
@@ -331,9 +333,11 @@ public class Foo {
<configuration <b>debug="true"</b>>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>
- </layout>
+ <!-- encoders are by default assigned the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
+ <layout>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
+ </encoder>
</appender>
<root level="debug">
@@ -746,9 +750,11 @@ public class MyApp3 {
<pre class="prettyprint source"><configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>
- </layout>
+ <!-- encoders are by default assigned the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
+ </encoder>
</appender>
<b><logger name="chapters.configuration" level="INFO"/></b>
@@ -779,15 +785,15 @@ public class MyApp3 {
<appender name="STDOUT"
class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>
+ <encoder>
+ <pattern>
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
- </Pattern>
- </layout>
+ </pattern>
+ </encoder>
</appender>
- <b><logger name="chapters.configuration" level="INFO" />
- <logger name="chapters.configuration.Foo" level="DEBUG" /></b>
+ <b><logger name="chapters.configuration" level="INFO" /></b>
+ <b><logger name="chapters.configuration.Foo" level="DEBUG" /></b>
<root level="DEBUG">
<appender-ref ref="STDOUT" />
@@ -859,11 +865,11 @@ public class MyApp3 {
<appender name="STDOUT"
class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>
+ <encoder>
+ <pattern>
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
- </Pattern>
- </layout>
+ </pattern>
+ </encoder>
</appender>
<b><logger name="chapters.configuration" level="INFO" /></b>
@@ -967,21 +973,20 @@ public class MyApp3 {
<appender name="<b>FILE</b>" class="ch.qos.logback.core.FileAppender">
<file>myApp.log</file>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</pattern>
+ </encoder>
</appender>
- <appender name="<b>STDOUT</b>"
- class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%msg%n</Pattern>
- </layout>
+ <appender name="<b>STDOUT</b>" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>%msg%n</pattern>
+ </encoder>
</appender>
<root level="debug">
- <b><appender-ref ref="FILE" />
- <appender-ref ref="STDOUT" /></b>
+ <b><appender-ref ref="FILE" /></b>
+ <b><appender-ref ref="STDOUT" /></b>
</root>
</configuration></pre>
@@ -1015,9 +1020,9 @@ public class MyApp3 {
<pre class="prettyprint source"><configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
+ </encoder>
</appender>
<logger name="chapters.configuration">
@@ -1062,15 +1067,15 @@ public class MyApp3 {
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>myApp.log</file>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</pattern>
+ </encoder>
</appender>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%msg%n</pattern>
+ </encoder>
</appender>
<logger name="chapters.configuration">
@@ -1102,15 +1107,15 @@ public class MyApp3 {
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>foo.log</file>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%date %level [%thread] %logger{10} [%file : %line] %msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%date %level [%thread] %logger{10} [%file : %line] %msg%n</pattern>
+ </encoder>
</appender>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%msg%n</pattern>
+ </encoder>
</appender>
<logger name="chapters.configuration.Foo" <b>additivity="false"</b>>
@@ -1176,9 +1181,9 @@ public class MyApp3 {
<appender name="FILE"
class="ch.qos.logback.core.FileAppender">
<b><file>${USER_HOME}/myApp.log</file></b>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%msg%n</pattern>
+ </encoder>
</appender>
<root level="debug">
@@ -1204,9 +1209,9 @@ public class MyApp3 {
<appender name="FILE"
class="ch.qos.logback.core.FileAppender">
<b><file>${USER_HOME}/myApp.log</file></b>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%msg%n</pattern>
+ </encoder>
</appender>
<root level="debug">
@@ -1232,9 +1237,9 @@ public class MyApp3 {
<appender name="FILE"
class="ch.qos.logback.core.FileAppender">
<b><file>${USER_HOME}/myApp.log</file></b>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%msg%n</pattern>
+ </encoder>
</appender>
<root level="debug">
@@ -1264,9 +1269,9 @@ public class MyApp3 {
<appender name="FILE"
class="ch.qos.logback.core.FileAppender">
<b><file>${USER_HOME}/myApp.log</file></b>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%msg%n</pattern>
+ </encoder>
</appender>
<root level="debug">
@@ -1308,9 +1313,9 @@ fileName=myApp.log
<appender name="FILE"
class="ch.qos.logback.core.FileAppender">
<b><file>${destination}</file></b>
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%msg%n</pattern>
+ </encoder>
</appender>
<root level="debug">
@@ -1363,9 +1368,9 @@ fileName=myApp.log
<pre class="source"><b class="green big"><included></b>
<appender name="includedConsole" class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>"%d - %m%n"</Pattern>
- </layout>
+ <encoder>
+ <pattern>"%d - %m%n"</pattern>
+ </encoder>
</appender>
<b class="green big"></included></b></pre>
@@ -1396,9 +1401,9 @@ fileName=myApp.log
<pre class="prettyprint source"><configuration>
<b><contextName>myAppName</contextName></b>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%d <b>%contextName</b> [%t] %level %logger{36} - %msg%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%d <b>%contextName</b> [%t] %level %logger{36} - %msg%n</pattern>
+ </encoder>
</appender>
<root level="debug">
@@ -1428,9 +1433,9 @@ fileName=myApp.log
<b><contextName><span class="green">${appName}</span></contextName></b>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
- <layout class="ch.qos.logback.classic.PatternLayout">
- <Pattern>%d %contextName %level %msg %logger{50}%n</Pattern>
- </layout>
+ <encoder>
+ <pattern>%d %contextName %level %msg %logger{50}%n</pattern>
+ </encoder>
</appender>
<root level="DEBUG">
-----------------------------------------------------------------------
Summary of changes:
.../classic/encoder/PatternLayoutEncoder.java | 13 ++
.../java/chapters/configuration/additivityFlag.xml | 21 ++--
.../java/chapters/configuration/contextName.xml | 4 +-
.../main/java/chapters/configuration/duplicate.xml | 10 +-
.../java/chapters/configuration/includedConfig.xml | 6 +-
.../java/chapters/configuration/insertFromJNDI.xml | 8 +-
.../main/java/chapters/configuration/multiple.xml | 14 +-
.../configuration/onConsoleStatusListener.xml | 10 +-
.../java/chapters/configuration/restricted.xml | 16 ++-
.../main/java/chapters/configuration/sample0.xml | 8 +-
.../main/java/chapters/configuration/sample1.xml | 32 +++--
.../main/java/chapters/configuration/sample2.xml | 16 ++-
.../main/java/chapters/configuration/sample3.xml | 19 ++-
.../main/java/chapters/configuration/sample4.xml | 16 ++-
.../src/main/java/chapters/configuration/scan1.xml | 8 +-
.../src/main/java/chapters/configuration/scan2.xml | 6 +-
.../configuration/variableSubstitution1.xml | 6 +-
.../configuration/variableSubstitution2.xml | 6 +-
.../configuration/variableSubstitution3.xml | 6 +-
.../configuration/variableSubstitution4.xml | 6 +-
.../src/site/pages/manual/configuration.html | 141 ++++++++++----------
21 files changed, 207 insertions(+), 165 deletions(-)
hooks/post-receive
--
Logback: the generic, reliable, fast and flexible logging framework.
More information about the logback-dev
mailing list