开发者

log4j.xml file placement [duplicate]

This question already has answers here: Whe开发者_如何学编程re to place log4j.xml (6 answers) Closed 7 years ago.

i have created a log4j util class where i'm picking up the file using

org.apache.log4j.xml.DOMConfigurator.configure("log4j.xml");

but when testing, it throws

log4j:ERROR Could not open [log4j.xml].
java.io.FileNotFoundException: log4j.xml (The system cannot find the file specified.)
 at java.io.FileInputStream.<init>(FileInputStream.java:112)
 at java.io.FileInputStream.<init>(FileInputStream.java:72)

Can anyone tell me where do i place the log4j.xml file?


Put it on the classpath, in the root folder.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜