Where is the correct location to put Log4j.properties in an Eclipse project?

后端 未结 10 1627
伪装坚强ぢ
伪装坚强ぢ 2020-11-27 11:19

Where in my Eclipse project should I add the log4j.properties file so that it will work as intended?

10条回答
  •  青春惊慌失措
    2020-11-27 12:05

    You do not want to have the log4j.properties packaged with your project deployable -- that is a bad idea, as other posters have mentioned.

    Find the root Tomcat installation that Eclipse is pointing to when it runs your application, and add the log4j.properties file in the proper place there. For Tomcat 7, the right place is

    ${TOMCAT_HOME}/lib

提交回复
热议问题