开发者

Include log4j.xml in Project Jar

Does anyone know how I can bundle my log4j.开发者_开发知识库xml file when I build my project Jar and how I can load the file at run time? Thanks in advance.


You can put a log4j.xml in a jar just like any other file, and it's loaded according to Log4J's initialization rules.


To be precise, you should put your log4j.xml file to default package in your JAR file.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜