Add -Dlog4j.debug to get output telling you which config file is being used. Use log4j.xml instead and that will be used in preference to any log4j.properties.
On 3/24/07, Jennifer Lynch <[EMAIL PROTECTED]> wrote:
I am trying to enable log4j logging on a cluster of WebSphere app servers. (I am using WAS 6.1 on a Windows Server 2003 box.) I can get the log messages to print to the SystemOut.log files, but it always acts as if the log level is set to DEBUG no matter what I change it to. I have tried storing log4j.properties in a JAR in the EAR, and in other various directories on the hard drive. I have tried specifying the actual path to the file in my Java code using PropertyConfigurator.configure(path), and I have also tried just using getLogger() and hoping it picks up the right log4j.properties file. I even tried deleting every version of log4j.properties I could find, but it still logged all the error messages as if it was set to DEBUG level! I am wondering if perhaps it is picking up a log4j.properties file that I don't know about, since I never get an error that says it can't find the file even after I deleted mine. Maybe there are additional log4j.propertiesfiles buried inside all the JAR's and EAR's on this box (I am installing this in a test domain on the client site), but I cannot find a utility to search compressed files that is both free and not blocked by my company, and I'd rather not open them all up one-by-one. I also looked at the JavaDoc for log4j, and could not find any methods to print the path of the file it's using. How can I find the path of the log4j.properties file it is using, and/or how could I force it to use the one I want? Alternatively, does anyone know of other reasons besides multiple log4j.properties files that could be causing my issue? Thanks!
-- James Stauffer http://www.geocities.com/stauffer_james/ Are you good? Take the test at http://www.livingwaters.com/good/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
