No appenders could be found for logger(log4j)?

前端 未结 30 2694
[愿得一人]
[愿得一人] 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:52

    It looks like you need to add the location of your log4j.properties file to the Classpath in Eclipse.

    Make sure your project is open in Eclipse, then click on the "Run" menu at the top of Eclipse and click on the following:

    1. Run
    2. Run Configurations
    3. Classpath (tab)
    4. User Entries
    5. Advanced (button on the right)
    6. Add Folders
    7. then navigate to the folder that contains your log4j.properties file
    8. Apply
    9. Run

    The error message should no longer appear.

提交回复
热议问题