码迷,mamicode.com
首页 > 其他好文 > 详细

log4j

时间:2016-09-27 23:01:19      阅读:180      评论:0      收藏:0      [点我收藏+]

标签:

查看部分

# 配置根Logger,建议开发环境中要用debug
#log4j.rootLogger=debug,stdout,fstdout,cstdout

# 控制台输出
log4j.appender.cstdout=org.apache.log4j.ConsoleAppender
log4j.appender.cstdout.layout=org.apache.log4j.PatternLayout
log4j.appender.cstdout.layout.ConversionPattern=%5p [%t] - %m%n

log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout

# 日志文件输出
#log4j.appender.fstdout=org.apache.log4j.DailyRollingFileAppender
#log4j.appender.fstdout.Threshold=WARN
#log4j.appender.fstdout.File=/home/log/log4j.html
#log4j.appender.fstdout.DatePattern=‘.‘yyyy-MM
#log4j.appender.fstdout.layout=org.apache.log4j.HTMLLayout
#log4j.appender.fstdout.LocationInfo=true
#log4j.appender.fstdout.layout.ConversionPattern=%5p [%t] - %m%n

# 项目日志
log4j.logger.com.zyark=debug,cstdout,fstdout


查看所有

log4j.rootLogger=DEBUG,Console,File

log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.Target=System.out
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=[%c]%m%n

log4j.appender.File=org.apache.log4j.RollingFileAppender 
log4j.appender.File.File=mybatis.log
log4j.appender.File.MaxFileSize=10MB
log4j.appender.File.Threshold=ALL
log4j.appender.File.layout=org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern=[%p][%d{yyyy-MM-dd HH\:mm\:ss,SSS}][%c]%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





log4j

标签:

原文地址:http://www.cnblogs.com/ku-ker/p/62f59d511f5c7cf93f086d97e0b42278.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!