标签:logger spl info 分享图片 ruid initial you art .sql
springboot项目启动 ,使用的druid数据源,log4j报错
2018-05-21 08:59:21.168 INFO 1496 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final} log4j:WARN No appenders could be found for logger (druid.sql.Connection). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
解决办法:
配置log4j的日志配置文件log4j.properties
log4j.rootLogger=debug, stdout, R log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%5p - %m%n log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=firestorm.log log4j.appender.R.MaxFileSize=100KB log4j.appender.R.MaxBackupIndex=1 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n #log4j.logger.自己的包名=DEBUG log4j.logger.com.sxd=DEBUG
【log4j】springboot项目启动 ,使用的druid数据源,log4j报错 log4j:WARN Please initialize the log4j system properly.
标签:logger spl info 分享图片 ruid initial you art .sql
原文地址:https://www.cnblogs.com/sxdcgaq8080/p/9065796.html