|
@@ -1,43 +1,28 @@
|
|
|
-#
|
|
|
-# The MIT License (MIT)
|
|
|
-#
|
|
|
-# Copyright (c) 2014 abel533@gmail.com
|
|
|
-#
|
|
|
-# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
-# of this software and associated documentation files (the "Software"), to deal
|
|
|
-# in the Software without restriction, including without limitation the rights
|
|
|
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
-# copies of the Software, and to permit persons to whom the Software is
|
|
|
-# furnished to do so, subject to the following conditions:
|
|
|
-#
|
|
|
-# The above copyright notice and this permission notice shall be included in
|
|
|
-# all copies or substantial portions of the Software.
|
|
|
-#
|
|
|
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
-# THE SOFTWARE.
|
|
|
-#
|
|
|
-log4j.rootLogger=debug,stdout,logfile
|
|
|
-
|
|
|
-
|
|
|
+log4j.rootLogger=DEBUG, stdout
|
|
|
+log4j.logger.java.sql=debug,stdout
|
|
|
log4j.logger.com.github.pagehelper=DEBUG
|
|
|
log4j.logger.org.apache.ibatis=DEBUG
|
|
|
-
|
|
|
-log4j.logger.com.github.pagehelper.mapper = TRACE
|
|
|
-
|
|
|
+log4j.logger.com.github.pagehelper.mapper=TRACE
|
|
|
### Console output...
|
|
|
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
|
|
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
|
|
+log4j.appender.stdout.Encoding=UTF-8
|
|
|
+log4j.appender.stdout.Target=System.err
|
|
|
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n
|
|
|
-
|
|
|
-log4j.logger.com.ibatis=DEBUG
|
|
|
-log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG
|
|
|
-log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG
|
|
|
-log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG
|
|
|
-log4j.logger.Java.sql.Connection=DEBUG
|
|
|
-log4j.logger.java.sql.Statement=DEBUG
|
|
|
-log4j.logger.java.sql.PreparedStatement=DEBUG
|
|
|
+###### File Logger ###############
|
|
|
+#开发时,使用DEBUG,发布时最好修改成INFO,如果未设置级别,则使用
|
|
|
+#父日志记录器的,设置了就使用logger的,不管父日志怎样设置
|
|
|
+log4j.logger.com.yc=INFO,FILELOGER
|
|
|
+#开发时设为true,表示需要屏幕输出,发布时这里最好设置为false,表示不继承父日志记录器的Appender
|
|
|
+log4j.additivity.com.yc=true
|
|
|
+log4j.appender.FILELOGER=org.apache.log4j.RollingFileAppender
|
|
|
+#设置日志输出编码方式为UTF-8,如果不指定,会以当前运行操作系统的编码方式记录,这样在有的Linux上会出面乱码
|
|
|
+log4j.appender.FILELOGER.Encoding=UTF-8
|
|
|
+#${LOGS_PATH}为JVM环境变量,我们可以在运行里给JVM加上该参数 -DLOGS_PATH=e:/tmp/log
|
|
|
+log4j.appender.FILELOGER.File=${catalina.home}/logs/jiemit.log
|
|
|
+log4j.appender.FILELOGER.MaxFileSize=1024KB
|
|
|
+log4j.appender.FILELOGER.MaxBackupIndex=10
|
|
|
+#文件采用追加方式
|
|
|
+log4j.appender.FILELOGER.Append=true
|
|
|
+log4j.appender.FILELOGER.layout=org.apache.log4j.PatternLayout
|
|
|
+log4j.appender.FILELOGER.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] [%p] [%l] - [%m]%n
|