Where to place log4j.xml

前端 未结 6 756
滥情空心
滥情空心 2020-11-30 02:37

How can we specify were log4j has to look at when trying to find its xml configuration file ?

It seems that by default, log4j looks into the root of a class folder,

6条回答
  •  孤街浪徒
    2020-11-30 03:05

    You can use:

    DOMConfigurator.configure(log4jConfigurationFilename);
    

    and specify the location if it is other than the root!

提交回复
热议问题