log4j 属性配置文件

log4j.rootLogger=DEBUG,F_DEBUG,F_INFO,F_WARN,F_ERROR,CONSOLE

## Disable other log

log4j.logger.org.springframework=ERROR

log4j.logger.org.apache=ERROR

log4j.logger.com.opensymphony.xwork2=ERROR

log4j.logger.com.ibatis=ERROR

log4j.logger.org.hibernate=ERROR

log4j.logger.com.mchange.v2=ERROR

log4j.logger.org.directwebremoting=ERROR

log4j.logger.freemarker=ERROR

log4j.logger.net.sf.ehcache=ERROR

## console appender

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=[%p][%d{ISO8601}][%l]%m%n

## DEBUG

log4j.appender.F_DEBUG=org.apache.log4j.RollingFileAppender

log4j.appender.F_DEBUG.Threshold=DEBUG

log4j.appender.F_DEBUG.file=${catalina.home}/logs/debug/portalasg_sync_debug.log

log4j.appender.F_DEBUG.Encoding=UTF-8

log4j.appender.F_DEBUG.MaxFileSize=10MB

log4j.appender.F_DEBUG.MaxBackupIndex=100

log4j.appender.F_DEBUG.layout=org.apache.log4j.PatternLayout

log4j.appender.F_DEBUG.layout.ConversionPattern=[%p][%d{ISO8601}][%l]%m%n

## INFO

log4j.appender.F_INFO=org.apache.log4j.RollingFileAppender

log4j.appender.F_INFO.Threshold=INFO

log4j.appender.F_INFO.file=${catalina.home}/logs/info/portalasg_sync_info.log

log4j.appender.F_INFO.Encoding=UTF-8

log4j.appender.F_INFO.MaxFileSize=10MB

log4j.appender.F_INFO.MaxBackupIndex=100

log4j.appender.F_INFO.layout=org.apache.log4j.PatternLayout

log4j.appender.F_INFO.layout.ConversionPattern=[%p][%d{ISO8601}][%l]%m%n

## WARN

log4j.appender.F_WARN=org.apache.log4j.RollingFileAppender

log4j.appender.F_WARN.Threshold=WARN

log4j.appender.F_WARN.file=${catalina.home}/logs/warn/portalasg_sync_warn.log

log4j.appender.F_WARN.Encoding=UTF-8

log4j.appender.F_WARN.MaxFileSize=10MB

log4j.appender.F_WARN.MaxBackupIndex=100

log4j.appender.F_WARN.layout=org.apache.log4j.PatternLayout

log4j.appender.F_WARN.layout.ConversionPattern=[%p][%d{ISO8601}][%l]%m%n

## ERROR

log4j.appender.F_ERROR=org.apache.log4j.RollingFileAppender

log4j.appender.F_ERROR.Threshold=ERROR

log4j.appender.F_ERROR.file=${catalina.home}/logs/error/portalasg_sync_error.log

log4j.appender.F_ERROR.Encoding=UTF-8

log4j.appender.F_ERROR.MaxFileSize=10MB

log4j.appender.F_ERROR.MaxBackupIndex=100

log4j.appender.F_ERROR.layout=org.apache.log4j.PatternLayout

log4j.appender.F_ERROR.layout.ConversionPattern=[%p][%d{ISO8601}][%l]%m%n

相关推荐