Re: getConfigurationFileName()

2003-09-29 Thread Scott Morgan
Hi Henrik, Try; DOMConfigurator.configureAndWatch(YourClass.class.getResource(xml/log4j.xml)); for log4j.xml Or PropertyConfigurator.configureAndWatch(YourPropertyFile); for log4j.properties Is there a way that I can get the filename and absolute path for the file used to configure

RE: getConfigurationFileName()

2003-09-29 Thread Shapira, Yoav
Howdy, If you used a classpath-discovery-based mechanism for configuring log4j, you can do this: http://javaalmanac.com/egs/java.lang/ClassOrigin.html?l=rel to figure out if it came from a jar and if so which jar. But that's a partial solution at best ;( Yoav Shapira Millennium ChemInformatics

Re: getConfigurationFileName()

2003-09-28 Thread Scott Morgan
I agree that this would be a helpful way to determine what log4j config file log4j uses (.properties or .xml). However I have found my problem in figuring out which config file to be even a bit more complex than which file since I am usually loading log4j.xml form jar files it is always in the