How to initialize log4j properly?

前端 未结 24 3013
太阳男子
太阳男子 2020-11-22 06:49

After adding log4j to my application I get the following output every time I execute my application:

log4j:WARN No appenders could be found for logger (slideselec         


        
24条回答
  •  北海茫月
    2020-11-22 07:01

    If you are having this error on Intellij IDEA even after adding the log4j.properties or log4j.xml file on your resources test folder, maybe the Intellij IDEA is not aware yet about the existence of the file.

    So, after add the file, right click on the file and choose Recompile log4j.xml.

提交回复
热议问题