可以先附上一个log4j2的资源文件详细内容,对照着看 ### set log levels ### log4j.rootLogger = INFO , C , D , E ### console ### log4j.appender.C = org.apache.log4j.ConsoleAppender log4j.appender.C.Target = System.out log4j.appender.C.layout = org.apache.log4j.PatternLayout l
在eclipse使用log4j2的时候遇到个问题: 我已经把log4j2.xml放到/src目录下了,而且设置从trace开始都打印到终端,但是我的程序里trace, info都不打印,到了error才打印 后来我发现,要选中eclipse的项目,右键--刷新,使得能在eclipse里看到log4j2.xml You could also see my answer here: http://stackoverflow.com/questions/14733698/log4j-2-configu