Add a properties file to IntelliJ's classpath

后端 未结 10 2313
栀梦
栀梦 2020-11-28 19:20

I\'m running a simple Java program from the IntelliJ IDE using the Run->Run menu. It works fine. Now I want to add log4j logging.

I added a resources folder under my

10条回答
  •  盖世英雄少女心
    2020-11-28 19:59

    This is one of the dumb mistakes I've done. I spent a lot of time trying to debug this problem and tried all the responses posted above, but in the end, it was one of my many dumb mistakes.

    I was using org.apache.logging.log4j.Logger (:fml:) whereas I should have used org.apache.log4j.Logger. Using this correct logger saved my evening.

提交回复
热议问题