tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <>
Subject Re: System.out refs
Date Thu, 07 Aug 2003 17:42:30 GMT
Costin Manolache wrote:
> Tim Funk wrote:
>>When I was looking at, I noticed it
>>used 2 different logging styles:
>>- Commons Logging
>>- log() which tries to use context.getLogger(), and if null uses
>>Shouldn't the log() method use commons-logging if context.getLogger()
>>returns null?
> Yes, it should.
> Well, IMO the context logging should use commons-logging :-)

IMO, c-l doesn't provide enough right now (as it is used in Catalina), 
so I would prefer to keep all the webapps related logging in the 
Catalina provided loggers, for now, as they provide useful features 
out-of-the-box (ex: log rotation).
Moving forward (maybe past a first stable 5.0.x - it could probably be 
done between betas, though, if it's easy enough), we would need to use 
non-static c-l logger instances, with categories matching their 
associated component. That would allow a user to integrate the logging 
generated by the application with the one generated by the container.
The only problem is that, since we'd want to keep the same level of 
functionality that we had before, we'd have to use and ship log4j (the 
rolling and stuff being provided by a custom configuration), although 
there wouldn't be any hard dependency on it.

Since the current solution works just fine, I don't feel any urgency to 
work on that. I think you would be needed if that is to be implemented 
before 5.0.x stable.

>>Bonus q: If anything uses System.out (including printStackTrace()) and
>>commons-logging is available - all System.outs should be converted to
>>commons-logging calls?
> Yes.

That seems reasonable.


View raw message