You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2016/03/16 14:38:37 UTC

[20/50] logging-log4j2 git commit: [LOG4J2-63] Support configuration from version 1.x log4j.properties. Complete TTCC layout.

[LOG4J2-63] Support configuration from version 1.x log4j.properties.
Complete TTCC layout.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/3245c20c
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/3245c20c
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/3245c20c

Branch: refs/heads/LOG4J2-1278-gc-free-logger
Commit: 3245c20c822da109c51ab58f2f1ace90e150287f
Parents: 0d2cfbe
Author: ggregory <gg...@apache.org>
Authored: Wed Mar 9 09:50:00 2016 -0800
Committer: ggregory <gg...@apache.org>
Committed: Wed Mar 9 09:50:00 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/log4j/config/Log4j1ConfigurationFactory.java   | 2 +-
 .../org/apache/log4j/config/Log4j1ConfigurationFactoryTest.java    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/3245c20c/log4j-1.2-api/src/main/java/org/apache/log4j/config/Log4j1ConfigurationFactory.java
----------------------------------------------------------------------
diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/config/Log4j1ConfigurationFactory.java b/log4j-1.2-api/src/main/java/org/apache/log4j/config/Log4j1ConfigurationFactory.java
index fc07c1c..578b2ab 100644
--- a/log4j-1.2-api/src/main/java/org/apache/log4j/config/Log4j1ConfigurationFactory.java
+++ b/log4j-1.2-api/src/main/java/org/apache/log4j/config/Log4j1ConfigurationFactory.java
@@ -122,7 +122,7 @@ public class Log4j1ConfigurationFactory extends ConfigurationFactory {
             }
             case "org.apache.log4j.TTCCLayout": {
                 // TODO We do not have a %d for the time since the start of the app?
-                appenderBuilder.add(newPatternLayout(builder, "%d{UNIX_MILLIS} [%threadName] %level %logger - %m%n"));
+                appenderBuilder.add(newPatternLayout(builder, "%relative [%threadName] %level %logger - %m%n"));
                 break;
             }
             case "org.apache.log4j.HTMLLayout": {

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/3245c20c/log4j-1.2-api/src/test/java/org/apache/log4j/config/Log4j1ConfigurationFactoryTest.java
----------------------------------------------------------------------
diff --git a/log4j-1.2-api/src/test/java/org/apache/log4j/config/Log4j1ConfigurationFactoryTest.java b/log4j-1.2-api/src/test/java/org/apache/log4j/config/Log4j1ConfigurationFactoryTest.java
index 3212db0..4d637b2 100644
--- a/log4j-1.2-api/src/test/java/org/apache/log4j/config/Log4j1ConfigurationFactoryTest.java
+++ b/log4j-1.2-api/src/test/java/org/apache/log4j/config/Log4j1ConfigurationFactoryTest.java
@@ -77,7 +77,7 @@ public class Log4j1ConfigurationFactoryTest {
     @Test
     public void testConsoleTtccLayout() throws Exception {
         final PatternLayout layout = (PatternLayout) testConsole("config-1.2/log4j-console-TTCCLayout.properties");
-        Assert.assertEquals("%d{UNIX_MILLIS} [%threadName] %level %logger - %m%n", layout.getConversionPattern());
+        Assert.assertEquals("%relative [%threadName] %level %logger - %m%n", layout.getConversionPattern());
     }
 
     @Test