log4j.properties的配置

### set log levels ###
#log4j.rootLogger = debug, stdout, D, E
log4j.rootLogger = stdout, D, E
### out to kong zhi tai ###
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target = System.out
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = %d{ABSOLUTE} %5p %c:%L - %m%n
### out to ri zhi wen jian all ###
log4j.appender.D = org.apache.log4j.DailyRollingFileAppender
##
#log4j.appender.D.File =/home/webgate/web/runs/logs/hjck_log.log
log4j.appender.D.File = E://logs/fapayg_log.log
log4j.appender.D.DatePattern='_'yyyy-MM-dd'.log'
log4j.appender.D.Append = true
## out DEBUG ji bie yi shang wen jian
log4j.appender.D.Threshold = DEBUG
log4j.appender.D.layout = org.apache.log4j.PatternLayout
log4j.appender.D.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [%t:%r] - [%p] %m%n
log4j.appender.D.encoding=GBK

### bao cun yi chang dao dan du wen jian error ###
log4j.appender.E = org.apache.log4j.DailyRollingFileAppender
log4j.appender.E.DatePattern='_'yyyy-MM-dd'.log'
## yi chang wen jian ming
##
log4j.appender.E.File = E://logs/fapayg_error.log

## out ERROR ji bie yi shang wen jian !!!
log4j.appender.E.Append = true
log4j.appender.E.Threshold = ERROR
log4j.appender.E.layout = org.apache.log4j.PatternLayout
log4j.appender.E.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [%t:%r] - [%p] %m%n
log4j.appender.E.encoding=GBK

log4j.logger.java.sql.Connection = debug
log4j.logger.java.sql.Statement = info
log4j.logger.java.sql.PreparedStatement = debug, fileout
:evil: 有兴趣的可以加Q群:203609918,我们一起进步!!!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值