现在的位置: 首页 > 综合 > 正文

Spring中使用Log4定制日志级别

2013年10月26日 ⁄ 综合 ⁄ 共 229字 ⁄ 字号 评论关闭

在Classpath下加入log4j.properties

log4j.rootLogger=WARN,stdou
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] -%m%n

抱歉!评论已关闭.