当我试图执行以下代码时,只有最后两个语句被显示("Here is some ERROR" 和 "Here is some FATAL"),前三个语句没有被显示。由于我刚开始学习这个主题,请问这是为什么?
logger.debug("Here is some DEBUG");
logger.info("Here is some INFO");
logger.warn("Here is some WARN");
logger.error("Here is some ERROR");
logger.fatal("Here is some FATAL");
log4j.property文件已经存在
log4j.rootLogger=debug,stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%5p] %d{mm:ss}(%F:%M:%L)%n%m%n%n
log4j.property
,而应该是log4j.properties
。 - Rakesh Juyal