开发者

Unwanted dependency logging with log4j

I'm using a project call JarClassLoader (JCL) which allows me to load a jar from an InputStream. This is very h开发者_Python百科elpful, but I've found that the JarClassLoader leaves an log4j.xml file and loads that file at runtime. I'm using slf4j for my logging statements, and also using log4j for logging in my project. Here is a link to the JCL log4j.xml file: http://code.google.com/p/jcloader/source/browse/trunk/JCL2/src/main/resources/org/xeustechnologies/jcl/logging/log4j.xml?r=142 I would like to ignore this completely, as I have my own logging setup. Any ideas on how I can prevent this file from being loaded? Or how I can remove JCL logging after it's loaded. Or, if there is something else other than JCL that can read a InputSteam and grab the jar file out of the stream. Thanks in advance.


Actually, it's a mistake to ship log4j.xml (or any other logging configuration file) with a library that is intended to be linked with other projects. It results with exactly the problem you have now. I'd issue a bug report for that and use a private copy of the jar file without log4j.xml, until it is fixed.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜