log4j.xml文件的位置 [英] log4j.xml file placement
本文介绍了log4j.xml文件的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个log4j util类,在其中我将使用
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)
谁能告诉我在哪里放置log4j.xml文件?
Can anyone tell me where do i place the log4j.xml file?
推荐答案
将其放在类路径的根文件夹中.
Put it on the classpath, in the root folder.
这篇关于log4j.xml文件的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文