java_log4j

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java_log4j相关的知识,希望对你有一定的参考价值。

OFF FATAL ERROR WARN INFO DEBUG ALL

log4j.rootCategory=INFO, stdout , R

###org.apache.log4j.ConsoleAppenderuff08u63a7u5236u53f0uff09uff0corg.apache.log4j.FileAppender

org.apache.log4j.DailyRollingFileAppender

org.apache.log4j.RollingFileAppender

org.apache.log4j.WriterAppender u5c06u65e5u5fd7u4fe1u606fu4ee5u6d41u683cu5f0fu53d1u9001u5230u4efbu610fu6307u5b9au7684u5730u65b9

log4j.appender.stdout=org.apache.log4j.ConsoleAppender

#org.apache.log4j.htmlLayout u4ee5HTMLu8868u683cu5f62u5f0fu5e03u5c40
#org.apache.log4j.PatternLayout u53efu4ee5u7075u6d3bu7684u6307u5b9au5e03u5c40u6a21u5f0f

org.apache.log4j.SimpleLayout u5305u542bu65e5u5fd7u4fe1u606fu7684u7ea7u522b u548cu4fe1u606fu5b57u7b26u4e32

org.apache.log4j.TTCCLayout u5305u542bu65e5u5fd7u4ea7u751fu7684u4e16u754cu3001u7ebfu7a0bu3001u7c7bu522bu7b49u7b49u4fe1u606f

log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[QC] %d{yyyy-MM-dd HH:mm:ss SSS} %p [%t] %C.%M(%L) | %m%n

log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.File=F:javalogqc.log
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d-[TS] %p %t %c - %m%n

#u6307u5b9a com.neusoft u5305u4e0bu6240u6709u7c7bu7684u7b49u7ea7u4e3adebug u53efu4ee5u628a com.neusoftu6539u4e3au81eau5df1u9879u76eeu6240u7528u5305u540d
#log4j.logger.com.neusoft=DEBUG

#u8fd9u4e24u53e5u662fu628au8fd9u4e24u4e2au5305u4e0bu51fau73b0u7684u9519u8befu7b49u7ea7u8bbeu4e3aerroruff0cu5982u679cu9879u76eeu4e2du6ca1u6709u914du7f6eEHCacheuff0cu5219u4e0du9700u8981u8fd9u4e24u53e5
#log4j.logger.com.opensymphony.oscache=ERROR
#log4j.logger.net.sf.navigator=ERROR

#u8fd9u4e24u53e5u662fstrutsu7684u5305
#log4j.logger.org.apache.commons=ERROR
#log4j.logger.org.apache.struts=WARN

#u8fd9u53e5u662fdisplaytagu7684u5305
log4j.logger.org.displaytag=ERROR

log4j.logger.org.springframework=DEBUG
log4j.logger.com.ibatis.db=WARN
log4j.logger.org.apache.velocity=FATAL
log4j.logger.com.canoo.webtest=WARN
log4j.logger.org.hibernate.ps.PreparedStatementCache=WARN
log4j.logger.org.hibernate=DEBUG
log4j.logger.org.logicalcobwebs=WARN

以上是关于java_log4j的主要内容,如果未能解决你的问题,请参考以下文章

springmvc整合slf4jlog4j记录文本日志

集成log4jlog4j2logback与elk

Log4jLog4j 2JULJCL SFL4J Logback 与 Lombok 的使用

java日志框架JULJCLSlf4jLog4jLog4j2Logback 一网打尽

java日志框架JULJCLSlf4jLog4jLog4j2Logback 一网打尽

java日志框架JULJCLSlf4jLog4jLog4j2Logback 一网打尽