완벽 한 Log4j Spring MVC + iBATIS 설정

1940 단어 log4j
이 설정 은 데이터베이스 작업 등 로그 정 보 를 완벽 하 게 출력 할 수 있 습 니 다.
log4j.rootLogger=info,all
log4j.logger.org.springframework=info,spring,all,stdout
log4j.logger.org.apache=info,all
log4j.logger.com.ibatis=debug,all,stdout
log4j.logger.java.sql=debug,all,stdout
log4j.logger.com.digital.smartjsmgr=debug,all,stdout
log4j.logger.com.ibm=info,all,stdout
log4j.logger.com.mchange=info,all,stdout
#--------------- All Logger ------------------------------------------
log4j.appender.all          =org.apache.log4j.RollingFileAppender
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
log4j.appender.all.File     =../logs/all.log
log4j.appender.all.BufferSize=100
log4j.appender.all.MaxFileSize        =500KB
log4j.appender.all.MaxBackupIndex =5
log4j.appender.all.layout               =org.apache.log4j.PatternLayout
log4j.appender.all.layout.ConversionPattern=%n+<%d{yyyy-MM-dd HH:mm:ss-S}><%l>%n+<%-5p>---<%t><%m>%n
#-------------- Spring Logger ----------------------------------------
log4j.appender.spring          =org.apache.log4j.RollingFileAppender
log4j.appender.spring.File     =../logs/spring.log
log4j.appender.spring.BufferSize=100
log4j.appender.spring.MaxFileSize        =200KB
log4j.appender.spring.MaxBackupIndex =5
log4j.appender.spring.layout               =org.apache.log4j.PatternLayout
log4j.appender.spring.layout.ConversionPattern=%n+<%d{yyyy-MM-dd HH:mm:ss-S}><%l>%n+<%-5p>---<%t><%m>%n
#-----------------stdout logger--------------------------------------
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 %5p %C:%M:%L - %m%n

좋은 웹페이지 즐겨찾기