Libraries shouldn't include a log4j config file so hopefully few will have that problem. You could use a log4j.xml to prevent the use of any log4j.properties in a lib jar.
On Nov 15, 2007 12:57 PM, Jim the Standing Bear <[EMAIL PROTECTED]> wrote: > Hi all, > > From an earlier problem, I discovered that my application wasn't using > the log4j.properties I supplied. In fact, I am not even sure if it > was using the log4j from log4j-1.2.13.jar that I supplied. > > This is because my app also uses cog-jglobus, which contains its own > version of log4j. By turning on the debug option, I discovered that > the log4j was first looking for XML properties file, which it could > not find, then it somehow knew there would be a log4j.properties file > packaged in cog-jglobus-1.4.jar, and it used that instead. After I > repackaged cog-jglobus by removing the log4j.properties, it started > to use the properties file that came with axis2-0.93.jar. > > So it becomes impractical for me to repackage every single frigging > jar that comes with its own log4j.properties. So what is the best way > to specify the app to use the log4j from log4j-1.2.13.jar, as well as > my own log4j.properties? > > Currently my code reads a properties file for the application, and one > property specifies where logj4.properties is. I would then use that > property value to supply PropertyConfigurator.configure() in the > constructor of the entry class. It seems that this may not be the > best way to do so since log4j automatically read other properties file > prior to this one. > > Thanks. > > -- Jim > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- James A. N. Stauffer http://www.geocities.com/stauffer_james/ Are you good? Take the test at http://www.livingwaters.com/good/