On Tue, 2 Jul 2002 [EMAIL PROTECTED] wrote:

> Glen, I understand BUT..  Calling LogFactory.getLog
> - forces a hashtable lookup on every call to obtain the correct LogFactory
> implementation (key is classloader)...

That's why you would call LogFactory.getLog() only once, at init time.
Most projects are using a static field - and the cost is minimal.

> - doesn't guarentee that the LogFactory implementation found is the same
> one used by the rest of Axis (context class loaders, etc)

That may only happen if you have multiple logger implementations and 
a strange configuration.

> By getting calling and caching LogFactory.getFactory(),
> - we go directly the the correct instance every time.
> - avoid differences in class loader etc.
> - Provide a single hook where (if needed) the log factory could be
> overriden by axis, rather than depending upon the logging configuration to
> figure out the right one...

> I've got a side agenda with this in that in the (near future?) I can
> override the logger's configuration file and have it use one provided by
> axis, possibly the same configuration properties file that axis will use in
> the near future.

Well, that may conflict with what we are trying to do in tomcat - i.e. 
allow central configuration ( probably JMX based ) of the loggers. 
Also creating a hook and configuration for axis logging factory may 
conflict with the container hooks and configurations.

There are ongoing discussions with Ceki and on tomcat-dev on how to 
deal with the logging and log configuration. 

Costin 

Reply via email to