2 回答
TA贡献1851条经验 获得超4个赞
# Output pattern : date [thread] priority category - message
log4j.rootLogger=WARN, Console, RollingFile
#Console
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n
#RollingFile
log4j.appender.RollingFile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.RollingFile.File=../logs/fgw.log
log4j.appender.RollingFile.layout=org.apache.log4j.PatternLayout
log4j.appender.RollingFile.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n
#Project defalult level
log4j.logger.dl=DUBUG
log4j.logger.org.springframework=WARN
log4j.logger.org.mybatis=DUBUG
这样就行了。
- 2 回答
- 0 关注
- 1493 浏览
添加回答
举报