Where to place log4j.xml
Posted
by Farid
on Stack Overflow
See other posts from Stack Overflow
or by Farid
Published on 2010-05-05T10:45:59Z
Indexed on
2010/05/05
14:28 UTC
Read the original article
Hit count: 243
log4j
Hi ,
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, I can say that using the debug log4j functionality and running my application from the IDE.
However, I don't have any class folder in my jar anymore. And the log4j.xml file is at the root of the jar.
I have already tried to set the option -Dlog4j.configuration=log4j.xml but it doesn't work.
Here is the global structure of my application at the moment :
- com
- lib
- meta-inf
- log4j.xml
Thanks !
© Stack Overflow or respective owner