logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yoav Shapira <yo...@apache.org>
Subject Re: Log4j.properties not read for included jar
Date Wed, 08 Dec 2004 19:25:19 GMT
Hi,
You can try setting the logger for the deli root package at DEBUG level, and/or
adding a special appender for it.

You don't need a separate log4j configuration file for it: one per classloader
repository is enough.  deli.jar is in WEB-INF/lib under the same webapp where
your WEB-INF/classes that work fine are located, right?

You can also try asking the providers of deli.jar what's up.  They might have
put in a special configuration syntax of their own.

Yoav Shapira http://www.yoavshapira.com

--- Keith Bottner <keith@barkinglizards.com> wrote:

> I am using Tomcat to publish a web application. I use log4j throughout my
> application and configure it with the following log4j.properties file.
> 
> # Create a single console appender that logs INFO and higher
> log4j.rootLogger=WARN, stdout log4j.com.blt=DEBUG, stdout
> com.hp.hpl.deli.Workspace=DEBUG, stdout
> 
> # Configure the stdout appender to go to the console
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> 
> # Configure the stdout appender to use the PatternLayout
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> 
> #Pattern to output the caller's filename and line number.
> 
> log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
> 
> My classes which all exist under com.blt work like a champ. However, I also
> include an external library called deli.jar in the /WEB-INF/lib directory of
> my web application. This library uses log4j as well, however, no matter what
> I do I cannot get logging turned on for this external library. Do I need to
> specify additional configuration parameters in this case? Or do I need to
> create a separate log4j.properties file and place it somewhere else for the
> external library?
> 
> BTW, the jar does NOT contain a log4j.properties file.
> 
> Thanks in advance for any illumination you can bring to this problem.
> 
> Regards,
> 
> Keith
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 


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


Mime
View raw message