You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Jennifer Lynch <jl...@gmail.com> on 2007/03/24 22:22:04 UTC

log4j with WebSphere clusters - changing log level does not work

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!

Re: log4j with WebSphere clusters - changing log level does not work

Posted by James Stauffer <st...@gmail.com>.
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 <jl...@gmail.com> 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: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org