spring解决"log4j:WARN No appenders could be found for logger"

1

在src下面新建file名为log4j.properties内容如下:

# Configure logging for testing: optionally with log file
log4j.rootLogger=WARN, stdout
# log4j.rootLogger=WARN, stdout, logfile

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

log4j.appender.logfile=org.apache.log4j.FileAppender
log4j.appender.logfile.File=target/spring.log
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n

 

Done

spring解决"log4j:WARN No appenders could be found for logger",布布扣,bubuko.com

spring解决"log4j:WARN No appenders could be found for logger"

上一篇:iOS开发——全局响应MotionEvent


下一篇:iOS开发- 自动消失的弹出框