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

后端 未结 10 1599
伪装坚强ぢ
伪装坚强ぢ 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:07

    If you have a library and you want to append the log4j:

    1. Create a folder named "resources" in your projet.
    2. Create a .properties file named log4j
    3. Set properties in log4j.properties file
    4. Push right button in the project and go to properties->Java Build Path and, finally, go to the "Source" tab.
    5. Push Add folder and search the "resources" folder created in step 1.
    6. Finish.

    (I have assumed that you have the log4j library added.)

    PD: Sorry for my english.

提交回复
热议问题