log4j


log4j.rootCategory=DEBUG, STDOUT, DAILYFILE, HTML, DATABASE
#log4j.rootCategory=DEBUG, STDOUT, DAILYFILE, ROLLINGFILE, HTML

#console
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
log4j.appender.STDOUT.layout.ConversionPattern=[[%d{yyyy MMM dd HH:mm:ss,SSS}] %p [%t] %l ]: %m%n

log4j.logger.com.troy.xmpl.log4j=INFO
log4j.logger.com.troy.xmpl.model=ERROR


#daily file
log4j.appender.DAILYFILE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.DAILYFILE.File=${log4j.log.DAILYFILE}
log4j.appender.DAILYFILE.layout=org.apache.log4j.PatternLayout
1log4j.appender.DAILYFILE.layout.ConversionPattern=[[%d{yyyy MMM dd HH:mm:ss,SSS}] %p [%t] %l ]: %m%n


#html !! encoding issue exists
log4j.appender.HTML=org.apache.log4j.FileAppender
log4j.appender.HTML.File=${log4j.log.DAILYFILE.HTML}
log4j.appender.HTML.layout=org.apache.log4j.HTMLLayout
log4j.appender.HTML.layout.Title=${log4j.log.DAILYFILE.HTML.TITLE}
log4j.appender.HTML.layout.LocationInfo=true


#database !! encoding issue exists
log4j.appender.DATABASE=org.apache.log4j.jdbc.JDBCAppender
log4j.appender.DATABASE.URL=${XMPL_DATABASE_URL}
log4j.appender.DATABASE.driver=${XMPL_DATABASE_DRIVER}
log4j.appender.DATABASE.user=${XMPL_DATABASE_USERNAME}
log4j.appender.DATABASE.password=${XMPL_DATABASE_PASSWORD}
log4j.appender.DATABASE.sql = INSERT INTO xmpl.secondary_xmpl_log_tbl (logDate,logTime,logThread,logLevel,logClass,logLogger,logMessage) values ('%d{yyyy-MM-dd}','%d{HH:mm:ss}','%t', '%p', '%c', '%l', '%m')
log4j.appender.DATABASE.layout=org.apache.log4j.PatternLayout
log4j.appender.DATABASE.layout.ConversionPattern = %d{yyyy MM dd HH:mm:ss,SSS} %-5p %t %c %m

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值