log4j.properties

#log4j.rootLogger=DEBUG,A1,R   
log4j.rootLogger=INFO,A1,R   
  
log4j.appender.A1=org.apache.log4j.ConsoleAppender   
log4j.appender.A1.layout=org.apache.log4j.PatternLayout   
log4j.appender.A1.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss,SSS} [%c]-[%p] %m%n   
  
log4j.appender.R=org.apache.log4j.RollingFileAppender   
#log4j.appender.R.File=c:/seaport.log   
log4j.appender.R.File=${webapp.root}/logs/myproject.log   
log4j.appender.R.MaxFileSize=1024KB   
log4j.appender.R.MaxBackupIndex=1  
#log4j.appender.R.layout=org.apache.log4j.HTMLLayout   
log4j.appender.R.layout=org.apache.log4j.PatternLayout   
log4j.appender.R.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} [%t] [%c] [%p] - %m%n  

你可能感兴趣的:(apache,C++,c,log4j,C#)