log4j

引用
# This is the configuring for logging displayed in the Application Server
# log4j.rootCategory=DEBUG, stdout

# Replace the line above if you want to put a log file into the directory
# you start Tomcat from
log4j.rootCategory=DEBUG, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
#log4j.appender.stdout=org.apache.log4j.DailyRollingFileAppender
#log4j.appender.stdout.File=/opt/blog-service/app-admin-service/logs/stdout.log
#log4j.appender.stdout.DatePattern='.'yyyyMMdd
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}:%p(%L)%t %c - %m%n



log4j.logger.com.opensymphony=DEBUG
log4j.additivity.com.opensymphony=true



log4j.logger.com.alisoft=DEBUG
log4j.additivity.com.alisoft=true

log4j.logger.com.meetup.memcached=DEBUG
log4j.additivity.com.meetup.memcached=true

log4j.logger.net.spy.memcached=DEBUG
log4j.additivity.net.spy.memcached=true

log4j.appender.performance=org.apache.log4j.DailyRollingFileAppender
log4j.appender.performance.file=/opt/blog-service/app-admin-service/logs/performance.log
log4j.appender.performance.DatePattern='.'yyyyMMdd
log4j.appender.performance.layout=org.apache.log4j.PatternLayout
log4j.appender.performance.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %m%n


log4j配置

-Djava.ext.dirs=lib //引用lib下所有的jar包

你可能感兴趣的:(log4j)