who logs the logger?
i'd hazard a guess that the ones which are delegating to jdk logging are in a parent classloader (tomcat or system) rather than the lib in the web app. one way to test this is to remove them from the directory and see if they are still picked up.
- robert
On 19 Jan 2005, at 11:33, [EMAIL PROTECTED] wrote:
The troubleshooting is more to do with which classloader is commons logging
loaded from - where (which classloader) does it find log4j....
log4j has really nice debug output in this regard.
Simple it maybe - but the environment in which its used rarely is :-)
The trouble is that tomcat 5.x loads commons-logging-api.jar on startup (!%$*)
So, there is some mystery as to where your webapp gets commons logging from.
If you have no commons-logging.jar in your web-inf/lib, it somehow finds
the one tomcat loaded.
If you do have commons-logging.jar in your web-inf/lib, it still seems to
use the one tomcat loaded.
If you have commons-logging.jar AND log4j.jar in your web-inf/lib, then
magically, it seems to use the commons-logging.jar in your web-inf/lib ...
and delegate to log4j...
I can see this by just looking at the classloader that the Log class is loaded with.
The problem I have is that I have a webapp using numerous libraries which
in turn use commons-logging ... and some of them are delegating to log4j
and some are not. And I cant work out why...
-Nick
PS: I posted a question - but no answer so far about why there are two commons-logging jars.... why are there two different jars?
Extranet [EMAIL PROTECTED] - 19/01/2005 06:23
Please respond to [email protected]
To: commons-user
cc:
Subject: Re: [logging] troubleshooting
On Tue, 2005-01-18 at 21:12 +0000, [EMAIL PROTECTED] wrote:logging
Is there a -D parameter I can define to get commons logging to spit out
diagnostic information ala log4j's -Dlog4j.debug?
I am having some pain with a webapp using commons logging on Tomcat 5. Trying to work out which commons logging it is using - and why someis going to log4j and some to jdk1.4 logging...
Sorry, no such option exists.
If commons-logging has serious problems on startup, it can throw exceptions. But in general, it is considered so simple that diagnostics are not needed.
Note that you can explicitly specify what logging library to use by using system properties or properties files, rather than relying on commons-logging's auto-detection. See the commons-logging documentation for details.
Regards,
Simon
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
This message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified.
*********************************************************************** ***********************
BNP Paribas Private Bank London Branch is authorised by CECEI & AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom.
BNP Paribas Securities Services London Branch is authorised by CECEI & AMF and is regulated by the Financial Services Authority for the conduct of its investment business in the United Kingdom.
BNP Paribas Fund Services UK Limited is authorised and regulated by the Financial Services Authority.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
