在maven项目下src的main的resources下面增加log4j.properties,添加的内容如下
#Configure logging for testing: optionally with log file #log4j.rootLogger=debug,appenderlog4j.rootLogger=info,appender#log4j.rootLogger=error,appenderlog4j.appender.appender=org.apache.log4j.ConsoleAppenderlog4j.appender.appender.layout=org.apache.log4j.TTCCLayout