log4j.rootLogger = INFO, Console
log4j.appender.Console = org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout = org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern = [%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n
在src-main-resources文件夹中创建文件log4j.properties,插入以上代码,解决eclipse控制台不输出信息的情况