log4j

发布时间:2020-06-22 04:06:17 作者:Todd的博客
来源:网络 阅读:321

#WOLF 2013-01-16 

# ALL DEBUG INFO WARN ERROR FATAL OFF

log4j.rootLogger = INFO, Console  , ErrorFile , InfoFile ,DebugFile,AllFile


log4j.appender.Console = org.apache.log4j.ConsoleAppender

log4j.appender.Console.Target = System.out 

log4j.appender.Console.ImmediateFlush = true

log4j.appender.Console.Threshold = INFO    

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

log4j.appender.Console.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss SSS} - %c -%-4r [%t] %-5p %c %x - %m%n


log4j.appender.InfoFile = org.apache.log4j.DailyRollingFileAppender    

log4j.appender.InfoFile.File = /htc/htc/logs/info/infoFile.log  

log4j.appender.InfoFile.Threshold = INFO 

# default true is  add to File  | false is cover File  

log4j.appender.InfoFile.Append = true   

log4j.appender.InfoFile.DatePattern='.'yyyy-MM-dd 

log4j.appender.InfoFile.ImmediateFlush = true     

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

log4j.appender.InfoFile.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss SSS} - %c -%-4r [%t] %-5p %c %x - %m%n


log4j.appender.AllFile = org.apache.log4j.DailyRollingFileAppender    

log4j.appender.AllFile.File = /htc/htc/logs/console/allFile.log  

log4j.appender.AllFile.Threshold = ALL 

# default true is  add to File  | false is cover File  

log4j.appender.AllFile.Append = true  

log4j.appender.AllFile.DatePattern='.'yyyy-MM-dd 

log4j.appender.AllFile.ImmediateFlush = true     

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

log4j.appender.AllFile.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss SSS} - %c -%-4r [%t] %-5p %c %x - %m%n


log4j.appender.ErrorFile = org.apache.log4j.RollingFileAppender    

log4j.appender.ErrorFile.File = /htc/htc/logs/error/errorFile.log    

log4j.appender.ErrorFile.Append = true   

log4j.appender.ErrorFile.ImmediateFlush = true   

log4j.appender.ErrorFile.Threshold = ERROR   

log4j.appender.ErrorFile.DatePattern='.'yyyy-MM-dd

log4j.appender.ErrorFile.MaxFileSize = 4MB    

log4j.appender.ErrorFile.MaxBackupIndex = 3  

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

log4j.appender.ErrorFile.layout.ConversionPattern = %d{yyyy-MM-dd HH\:mm\:ss SSS} - %c -%-4r [%t] %-5p %c %x - %m%n 


log4j.appender.DebugFile = org.apache.log4j.RollingFileAppender  

log4j.appender.DebugFile.File = /htc/htc/logs/debug/debugLog.log 

log4j.appender.DebugFile.Threshold = ERROR     

log4j.appender.DebugFile.Append = true   

log4j.appender.DebugFile.DatePattern='.'yyyy-MM-dd 

log4j.appender.DebugFile.ImmediateFlush = true   

log4j.appender.DebugFile.MaxFileSize =4MB    

log4j.appender.DebugFile.MaxBackupIndex = 3   

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

log4j.appender.DebugFile.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss SSS} - %c -%-4r [%t] %-5p %c %x - %m%n 



# springMVC interceptor logging write

log4j.logger.org.springframework.web.servlet.handler.SimpleMappingExceptionResolver=WARN


log4j.logger.net.sf.navigator=ERROR

log4j.logger.net.sf.acegisecurity=WARN

log4j.logger.net.sf.acegisecurity.intercept.event.LoggerListener=WARN

log4j.logger.org.apache.commons=ERROR

log4j.logger.org.apache.struts=WARN

log4j.logger.org.displaytag=ERROR

log4j.logger.org.springframework=WARN

log4j.logger.org.apache.velocity=WARN


# HttpClient logging configuration...

log4j.logger.org.apache.http.wire = WARN

log4j.logger.org.apache.http.headers = WARN

log4j.logger.org.apache.http = WARN


# SqlMap logging configuration...


log4j.logger.org.apache.jasper = ERROR  

log4j.logger.org.apache.catalina.startup.TldConfig = ERROR  

log4j.logger.org.apache.catalina.session.ManagerBase = ERROR  

  

log4j.logger.com.fiscal = INFO  

log4j.logger.com.system = INFO  


log4j.logger.java.sql.Connection=ERROR

log4j.logger.java.sql.Statement=error

log4j.logger.java.sql.PreparedStatement=ERROR

log4j.logger.java.sql.ResultSet=error


推荐阅读:
  1. log4j如何配置和使用
  2. Logstash集成log4j

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

log4j 51cto og

上一篇:Palindrome Number

下一篇:javascript与php删除数组中的元素

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》