No appenders could be found for logger(log4j)?

前端 未结 30 2309
[愿得一人]
[愿得一人] 2020-11-22 08:16

I have put log4j to my buildpath, but I get the following message when I run my application:

log4j:WARN No appenders could be found for logger (dao.hsqlmanag         


        
30条回答
  •  长发绾君心
    2020-11-22 08:58

    I think you should understand where the log4j jar file or the Java code looks for the log4j configuration files.

    src/main/resources/log4j.properties is Eclipse path. Place them in a proper location so that you don't have to hard code the absolute path in code.

    Read my article and sample solution for that http://askyourquestions.info/2016/03/27/how-to-see-where-the-log-is-logger-in-slf4j/

提交回复
热议问题