log4j文件简易配置

简易配置log4j文件,可以进行有需要的修改
`log4j.rootCategory=INFO, CONSOLE ,LOGFILE

log4j.logger.com.hedger=INFO

log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%C %p %m %n

log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=D:/my.log
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%C %m %L %n`

posted @ 2020-07-29 10:46  Hedger_Lee  阅读(97)  评论(0编辑  收藏  举报