You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Fred Hauschel <ha...@googlemail.com> on 2007/07/18 12:19:42 UTC

[axis2] logging configuration for each service (classloading)

Hey all,
does anybody uses different loggings for different services?

To log the axis2 information, i need to choose the logger in
"WEB-INF\classes\commons-logging.properties".
But i also nedd the commons-logging.jar "WEB-INF\lib" If i use Log4j, it
will find my "WEB-INF\classes\og4j.properties" and "WEB-INF\lib\log4j.jar" .

So it is impossible to use "private static final Log LOG = LogFactory.getLog
(xyz.class);" because the factory always will use the global configured
(classloaded) Logfactory!!

In a ServiceLifeCycle implementation, it is possible to load a different
property file an recall the "PropertyConfigurator.configure(url);" but this
will change the configuration from the axis2 classloader and not the config
from my service classloader! because log4j was loaded from axis2.

I I try a workarround: use simplelog in axis2 and log4j in my services, so
it will fail because "private static final Log LOG = LogFactory.getLog(
xyz.class);" will return the logger spezified in "WEB-INF\classes\commons-
logging.properties" and not my log4jlogger that have been configured in my
ServiceLifeCycle Class ;-(


heelllp!
Fredy

Re: [axis2] logging configuration for each service (classloading)

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
On Wed, 2007-07-18 at 12:19 +0200, Fred Hauschel wrote:
> does anybody uses different loggings for different services?

Fred,

I do (and I guess many others). Simply put the log4j.properties into
your .aar (or .mar) file.


Michele


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