log4j 配置

[richmail@mail-APP01 classes]$ pwd
/home/richmail/web/thinkdrive/web/WEB-INF/classes
[richmail@mail-APP01 classes]$ cat local.properties
configdir=/home/richmail/web/thinkdrive/conf
[richmail@mail-APP01 classes]$
[richmail@mail-APP01 classes]$ cat /home/richmail/web/thinkdrive/conf/log4j.conf
#log4j.rootLogger=DEBUG,A1,R
log4j.rootLogger=DEBUG,A1
#log4j.appender.A1.Target = System.out
#log4j.appender.A1.Encoding=UTF-8
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern= %d [%p] [%t] %l %m%n


log4j.logger.common = DEBUG,common
log4j.appender.common = org.apache.log4j.DailyRollingFileAppender
log4j.appender.common.File =/home/richmail/logs/thinkdrive/common.log
log4j.appender.common.DatePattern = yyyy-MM-dd
log4j.appender.common.FILE.encoding=UTF-8
log4j.appender.common.layout = org.apache.log4j.PatternLayout
log4j.appender.common.layout.ConversionPattern=%d [%p] [%t] %c - %m%n

log4j.logger.admin = DEBUG,admin
log4j.appender.admin = org.apache.log4j.DailyRollingFileAppender
log4j.appender.admin.File =/home/richmail/logs/thinkdrive/admin.log
log4j.appender.admin.DatePattern = yyyy-MM-dd
log4j.appender.admin.FILE.encoding=UTF-8
log4j.appender.admin.layout = org.apache.log4j.PatternLayout
log4j.appender.admin.layout.ConversionPattern=%d [%p] [%t] %c - %m%n


log4j.logger.domain = DEBUG,domain
log4j.appender.domain = org.apache.log4j.DailyRollingFileAppender
log4j.appender.domain.File =/home/richmail/logs/thinkdrive/domain.log
log4j.appender.domain.DatePattern = yyyy-MM-dd
log4j.appender.domain.FILE.encoding=UTF-8
log4j.appender.domain.layout = org.apache.log4j.PatternLayout
log4j.appender.domain.layout.ConversionPattern=%d [%p] [%t] %c - %m%n

log4j.logger.group = DEBUG,group
log4j.appender.group = org.apache.log4j.DailyRollingFileAppender
log4j.appender.group.File =/home/richmail/logs/thinkdrive/group.log
log4j.appender.group.DatePattern = yyyy-MM-dd
log4j.appender.group.FILE.encoding=UTF-8
log4j.appender.group.layout = org.apache.log4j.PatternLayout
log4j.appender.group.layout.ConversionPattern=%d [%p] [%t] %c - %m%n

# rmapi\u65E5\u5FD7\u914D\u7F6E
log4j.logger.richinfo.rmapi = DEBUG,richinfo.rmapi
log4j.appender.richinfo.rmapi.File =/home/richmail/logs/thinkdrive/rmapi.log
#log4j.additivity.richnfo.rmapi = false
log4j.appender.richinfo.rmapi = org.apache.log4j.DailyRollingFileAppender
log4j.appender.richinfo.rmapi.DatePattern = yyyy-MM-dd
log4j.appender.richinfo.rmapi.layout = org.apache.log4j.PatternLayout
log4j.appender.richinfo.rmapi.layout.ConversionPattern=%d [%p] [%t] %c - %m%n

log4j.logger.entity = DEBUG,entity
log4j.appender.entity = org.apache.log4j.DailyRollingFileAppender
log4j.appender.entity.File =/home/richmail/logs/thinkdrive/entity.log
log4j.appender.entity.DatePattern = yyyy-MM-dd
log4j.appender.entity.FILE.encoding=UTF-8
log4j.appender.entity.layout = org.apache.log4j.PatternLayout
log4j.appender.entity.layout.ConversionPattern=%d [%p] [%t] %c - %m%n

log4j.logger.dm = DEBUG,dm
log4j.appender.dm = org.apache.log4j.DailyRollingFileAppender
log4j.appender.dm.File =/home/richmail/logs/thinkdrive/dm.log
log4j.appender.dm.DatePattern = yyyy-MM-dd
log4j.appender.dm.FILE.encoding=UTF-8
log4j.appender.dm.layout = org.apache.log4j.PatternLayout
log4j.appender.dm.layout.ConversionPattern=%d [%p] [%t] %c - %m%n

#spring
log4j.logger.org.springframework = ERROR
#mybatis
log4j.logger.org.mybatis.spring= DEBUG
log4j.logger.org.apache.ibatis= ERROR

#ibatis sql
log4j.logger.java.sql = DEBUG
log4j.logger.java.sql.Connection = DEBUG
log4j.logger.java.sql.Statement = DEBUG
log4j.logger.java.sql.PreparedStatement = DEBUG
log4j.logger.java.sql.ResultSet = DEBUG

#apche common
log4j.logger.org.apache.commons=ERROR
log4j.logger.org.codehaus.xfire=ERROR
log4j.logger.com.google.code.yanf4j=ERROR
log4j.logger.net.rubyeye.xmemcached=ERROR
[richmail@mail-APP01 classes]$
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值