|
@@ -0,0 +1,18 @@
|
|
|
+log4j.rootLogger=INFO,ConsoleAppender,RollingLogFileAppender
|
|
|
+
|
|
|
+#输出到文件
|
|
|
+log4j.appender.RollingLogFileAppender=org.apache.log4j.RollingFileAppender
|
|
|
+log4j.appender.RollingLogFileAppender.Threshold=INFO
|
|
|
+log4j.appender.RollingLogFileAppender.File=../logs/energy-report/log.log
|
|
|
+log4j.appender.RollingLogFileAppender.Append=true
|
|
|
+log4j.appender.RollingLogFileAppender.MaxFileSize=20MB
|
|
|
+log4j.appender.RollingLogFileAppender.MaxBackupIndex=100
|
|
|
+log4j.appender.RollingLogFileAppender.layout=org.apache.log4j.PatternLayout
|
|
|
+log4j.appender.RollingLogFileAppender.layout.ConversionPattern=%d{yyy MMM dd HH:mm:ss}:%-5p %l - %m%n
|
|
|
+#输出到控制台
|
|
|
+log4j.appender.ConsoleAppender=org.apache.log4j.ConsoleAppender
|
|
|
+log4j.appender.ConsoleAppender.Threshold=INFO
|
|
|
+log4j.appender.ConsoleAppender.ImmediateFlush=true
|
|
|
+log4j.appender.ConsoleAppender.Target=System.out
|
|
|
+log4j.appender.ConsoleAppender.layout=org.apache.log4j.PatternLayout
|
|
|
+log4j.appender.ConsoleAppender.layout.ConversionPattern=%d{yyyy-MM-dd HH\:mm\:ss}:%-5p %l - %m%n
|