commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramsay, Nigel" <Nigel.Ram...@NBNZ.CO.NZ>
Subject RE: [logging] components at server and web app levels
Date Tue, 07 Oct 2003 21:47:52 GMT
We have also had similar issues. We're using Weblogic for our app server,
and we also have a number of stand-along services that run in separate VMs
and with differing classloaders. We use a combination of commons-logging and
log4j.

Our solution was to centralise the logging in one place. Each of the
different VMs, etc then send their logging messages over some kind of
network transport (in our case, we're using JMS) to the central logging
service. Another option would be to use the SocketAppender. 

The implication of this is that you have to configure each VM, etc to point
to your central logging server. 

I hope this helps. I know that getting J2EE servers to log sensibly can be
quite a mission.

Nigel.

-----Original Message-----
From: Will Jaynes [mailto:jaynes@umich.edu]
Sent: Wednesday, 8 October 2003 3:01 a.m.
To: Jakarta Commons Users List
Subject: [logging] components at server and web app levels


It seems to me that commons-logging has lead me into a classloader 
quagmire. In a J2EE environment (I use Resin) how can different 
components that use commons-logging be deployed at different levels of 
the app server without problems? I can't find a way to centralize, at 
the  server level, any components that make use of commons-logging.

Example: I need to use Slide which uses HttpClient which uses 
commons-logging. These are used in most of my web apps, so I feel they 
should be deployed at the server level in resin/lib. But my web apps use 
Struts which uses commons-logging also. And my own web app classes just 
use log4j straight up.

I haven't been able to find any combination of jars-in-libs that works, 
except putting all jars in the WEB-INF/lib.

The problem seems to come down to the fact that the classloader that 
loads the LogFactory class may not be the same as the thread context 
class loader that LogFactoryImpl uses to find the default logging 
implementation (in my case, Log4j) But I'm waaay out of my comfort zone 
of knowledge.

So... Is it possible to use some components that use commons-logging at 
the server level, and yet still use other components that use 
commons-logging in a web app?

Will


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

This communication is confidential and may contain privileged material.
If you are not the intended recipient you must not use, disclose, copy or retain it.
If you have received it in error please immediately notify me by return email
and delete the emails.
Thank you.

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


Mime
View raw message