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 Maarten Bosteels <mb...@gmail.com> on 2010/04/01 00:03:29 UTC

Re: Tomcat 6 and log4j 1.2.14 - Why No Web Application Logging?

Try starting tomcat with the system property log4j.debug set
for example :

export TOMCAT_OPTS="-Dlog4j.debug"

IIRC, log4j will output info about which config file it's using to
standard output.

see also http://logging.apache.org/log4j/1.2/manual.html


Maarten

On Wed, Mar 31, 2010 at 9:22 PM, Egan, David <Da...@supermedia.com>wrote:

> Following the instructions from here:
> http://tomcat.apache.org/tomcat-6.0-doc/logging.html#log4j.
> specifically the end 2nd last paragraph about config web application
> logging.
>
>
> My application (SOAP service) runs successfully AND logs when I run locally
> on my Window Tomcat 6 instance (both to console and log file specified in
> log4j.properties).
>
> Migrate the SAME war file to Solaris test environment, with same
>    WEB-INF/classes/log4j.properties file
>    WEB-INF/lib/log4j-1.2.14.jar
>
> When migrated to our Solaris environment running same version of Tomcat
> (6.0.24) absolutely no logging occurs.  Nothing showing in console log nor
> in log file specified.  It's as if it's going completely to /dev/null....
>
> There is an older jar for log4j in the classpath for Tomcat for Axis.
>  However my understanding is my web application will use the properties and
> jar file in the war file path.  And I'm not using Axis.
>
> Absolutely baffed - works perfectly fine locally but not at all on Solaris
> test server.  Getting zero error messages so it's as if it's getting blocked
> somehow.  Yet the application runs and logging should be happening.
>
> I'd include the log4j.properties but it's not relevent - the same file
> works fine locally but no errors or results on Solaris.
>
> Thoughts/ideas where to look?
>
> --
> David Egan
>
>

RE: Tomcat 6 and log4j 1.2.14 - Why No Web Application Logging?

Posted by "Egan, David" <Da...@supermedia.com>.
Turns out the admins had copied log4j.jar into an endorsed directory (not sure if it was the Java or Tomcat endorsed)....
Removing that jar and restarting Tomcat proved the solution and now logging blissfully.

Thanks all. 


--
David Egan 
-----Original Message-----
From: Maarten Bosteels [mailto:mbosteels.dns@gmail.com] 
Sent: Wednesday, March 31, 2010 5:03 PM
To: Log4J Users List
Subject: Re: Tomcat 6 and log4j 1.2.14 - Why No Web Application Logging?

Try starting tomcat with the system property log4j.debug set
for example :

export TOMCAT_OPTS="-Dlog4j.debug"

IIRC, log4j will output info about which config file it's using to
standard output.

see also http://logging.apache.org/log4j/1.2/manual.html


Maarten

On Wed, Mar 31, 2010 at 9:22 PM, Egan, David <Da...@supermedia.com>wrote:

> Following the instructions from here:
> http://tomcat.apache.org/tomcat-6.0-doc/logging.html#log4j.
> specifically the end 2nd last paragraph about config web application
> logging.
>
>
> My application (SOAP service) runs successfully AND logs when I run locally
> on my Window Tomcat 6 instance (both to console and log file specified in
> log4j.properties).
>
> Migrate the SAME war file to Solaris test environment, with same
>    WEB-INF/classes/log4j.properties file
>    WEB-INF/lib/log4j-1.2.14.jar
>
> When migrated to our Solaris environment running same version of Tomcat
> (6.0.24) absolutely no logging occurs.  Nothing showing in console log nor
> in log file specified.  It's as if it's going completely to /dev/null....
>
> There is an older jar for log4j in the classpath for Tomcat for Axis.
>  However my understanding is my web application will use the properties and
> jar file in the war file path.  And I'm not using Axis.
>
> Absolutely baffed - works perfectly fine locally but not at all on Solaris
> test server.  Getting zero error messages so it's as if it's getting blocked
> somehow.  Yet the application runs and logging should be happening.
>
> I'd include the log4j.properties but it's not relevent - the same file
> works fine locally but no errors or results on Solaris.
>
> Thoughts/ideas where to look?
>
> --
> David Egan
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org