其他分享
首页 > 其他分享> > No appenders could be found for logger [IntelliJ IDEA]

No appenders could be found for logger [IntelliJ IDEA]

作者:互联网

网上看了很多说在source文件夹下加一个log4j.properties

其实准确说应该在resources目录下加

在IDEA中,可以加一个文件夹放log4j.properties,并在这个文件夹右键-选择Mark Directory as - Resoures Root

log4j.rootLogger=INFO, Console, DEBUG 
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=(%r ms) [%t] %-5p: %c#%M %x: %m%n

 

标签:Console,appenders,No,could,IDEA,appender,文件夹,apache,log4j
来源: https://blog.csdn.net/Lord_sh/article/details/97268232