log4j No appenders could be found for logger

在main中加一句:BasicConfigurator.configure();

原文地址:https://www.cnblogs.com/longwaytogo/p/7207719.html