From bc5fc44966e627e71fba76a43cbf190d57006fd9 Mon Sep 17 00:00:00 2001 From: sershe Date: Wed, 3 Apr 2013 19:56:37 +0000 Subject: [PATCH] HBASE-8247 inconsistent date format in different logs makes it painful to manipulate them git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1464184 13f79535-47bb-0310-9956-ffa450edef68 --- conf/log4j.properties | 10 +++------- hbase-server/src/test/resources/log4j.properties | 8 ++------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/conf/log4j.properties b/conf/log4j.properties index f12c05ea7a9..3acebd18d3a 100644 --- a/conf/log4j.properties +++ b/conf/log4j.properties @@ -24,7 +24,7 @@ log4j.appender.DRFA.DatePattern=.yyyy-MM-dd log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout # Pattern format: Date LogLevel LoggerName LogMessage -log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n +log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c: %m%n # Rolling File Appender properties hbase.log.maxfilesize=256MB @@ -38,11 +38,7 @@ log4j.appender.RFA.MaxFileSize=${hbase.log.maxfilesize} log4j.appender.RFA.MaxBackupIndex=${hbase.log.maxbackupindex} log4j.appender.RFA.layout=org.apache.log4j.PatternLayout -log4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n - - -# Debugging Pattern format -#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n +log4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c: %m%n # # Security audit appender @@ -72,7 +68,7 @@ log4j.appender.NullAppender=org.apache.log4j.varia.NullAppender log4j.appender.console=org.apache.log4j.ConsoleAppender log4j.appender.console.target=System.err log4j.appender.console.layout=org.apache.log4j.PatternLayout -log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p %c{2}: %m%n +log4j.appender.console.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}: %m%n # Custom Logging levels diff --git a/hbase-server/src/test/resources/log4j.properties b/hbase-server/src/test/resources/log4j.properties index 6c051975d6f..6ee91efc3b2 100644 --- a/hbase-server/src/test/resources/log4j.properties +++ b/hbase-server/src/test/resources/log4j.properties @@ -37,12 +37,8 @@ log4j.appender.DRFA.DatePattern=.yyyy-MM-dd # 30-day backup #log4j.appender.DRFA.MaxBackupIndex=30 log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout - -# Pattern format: Date LogLevel LoggerName LogMessage -#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n - # Debugging Pattern format -log4j.appender.DRFA.layout.ConversionPattern=%d %-5p [%t] %C{2}(%L): %m%n +log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %C{2}(%L): %m%n # @@ -52,7 +48,7 @@ log4j.appender.DRFA.layout.ConversionPattern=%d %-5p [%t] %C{2}(%L): %m%n log4j.appender.console=org.apache.log4j.ConsoleAppender log4j.appender.console.target=System.err log4j.appender.console.layout=org.apache.log4j.PatternLayout -log4j.appender.console.layout.ConversionPattern=%d %-5p [%t] %C{2}(%L): %m%n +log4j.appender.console.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %C{2}(%L): %m%n # Custom Logging levels