当前位置:编程学习 > 网站相关 >>

项目中log4j配置案例

[plain]  
#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 %6p at %C.%M(%F:%L)] %m%n  
  
log4j.appender.R=org.apache.log4j.DailyRollingFileAppender  
log4j.appender.R.File=E:/dms_logs/dms.log  
log4j.appender.RAppend=true  
log4j.appender.R.DatePattern='.'yyyy-MM-dd'.txt'  
log4j.appender.R.layout=org.apache.log4j.PatternLayout  
log4j.appender.R.layout.ConversionPattern=[%d %6p at %C.%M(%F:%L)] %m%n  
 
补充:综合编程 , 其他综合 ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,