log4j中Logger.getLogger()加载一个类提示错误

错误提示如下:The method getLogger(String) in the type Logger is not applicable for the arguments (Class)


等我知道这个报错的原因时,觉得自己粗心。

因为import错了包

我导入的:import java.util.logging.Logger;

应该导入:import org.apache.log4j.Logger;

log4j中Logger.getLogger()加载一个类提示错误_第1张图片


如上图,记下来以后别再犯这类的错误。


相关文章url:

http://www.cnblogs.com/jiaguozhilian/p/5819646.html

http://www.cnblogs.com/binbiubiu/p/5909035.html




你可能感兴趣的:(java)