log4j 的又一点体会

log4j.rootLogger=debug,stdout,file
log4j.logger.cbb=debug,httpInterfaceAppender

log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.Threshold=info 
log4j.appender.file.File=${catalina.home}/logs/drivesmsclient.log
log4j.appender.file.MaxFileSize=1000KB
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=[%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.Threshold=info
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n

##Hibernate begin##
log4j.logger.org.hibernate=debug
log4j.logger.org.hibernate.SQL=debug
log4j.logger.org.hibernate.HQL=debug

##MessageSenderHttpInterface begin##
log4j.appender.httpInterfaceAppender=org.apache.log4j.RollingFileAppender
log4j.appender.httpInterfaceAppender.Threshold=info 
log4j.appender.httpInterfaceAppender.File=${catalina.home}/logs/drivesmshttp.log
log4j.appender.httpInterfaceAppender.MaxFileSize=1000KB
log4j.appender.httpInterfaceAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.httpInterfaceAppender.layout.ConversionPattern=[%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n


你可能感兴趣的:(apache,sql,log4j,Hibernate)