tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: [5] commons-logging
Date Tue, 06 Aug 2002 21:21:39 GMT
On Tue, 6 Aug 2002, Craig R. McClanahan wrote:

> >  - use the 'usual' conventions for name -
> >     LogFactory.getLog( ApplicationDispatcher.class );
> >
> This is certainly simpler on the Tomcat developers.  A related convention
> would be to *not* make the Log instance static (as I've done in other
> scewnarios where I really did want to share the same Log instance across
> multiple application object instances), right?

I personally _hate_ the convention of using static log and one log 
instance per class. But that's what people seem to use, that's what
log4j and jdk logging samples do.

Since we don't know yet how we'll configure the logger to isolate 
webapps - let's start with this, and we can change later the code
that sets the name. Debug statements are less important, info()
and higher is what matters the most.

> LogFactory can do some interesting magic -- it ought to be possible to do
> something useful.  However, counting on the context class loader is going
> to be problematic in the parts of Catalina "above" contexts (such as the
> code that maps a request URL to a particular webapp).  I'd bet we aren't
> very careful, right now, about maintaining the thread context class loader
> in those situations.

We should - many bad things happen if we're not careful with the class 
loaders :-) 

It is not a tragedy if some debug goes to the wrong logger - at least 
for now. We can revisit the names after we figure out how to do magic. 


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message