commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject RE: Configuring jdk14 logging under tomcat
Date Tue, 19 Aug 2003 19:22:22 GMT
On Tue, 19 Aug 2003, Eric Giguere wrote:

> Date: Tue, 19 Aug 2003 10:48:41 -0400
> From: Eric Giguere <>
> Reply-To: Jakarta Commons Users List <>
> To: Jakarta Commons Users List <>
> Subject: RE: Configuring jdk14 logging under tomcat
> Hi Craig
> Euh, can I say here that I'm honored to have you answering one of my
> questions. I'm following with great interest all your work on both Tomcat,
> Struts and particulary on the standardization efforts for the Java Server
> Faces.
> Yes, its been quite clear in all the documentation that the configuration of
> the underlying log engine encapsultated by commons-logging is up to the
> programmer, using the underlying mechanism to do so. But since there is
> already a dependancy between commons-logging and Jdk1.4 logging package,

It is not really a dependency -- it's just one of the possible logging
implementations that can be used.

> I'm
> wondering if it would be desirable to add some pre-coded configuration
> mechanism in the Jdk14Logger, something like using of a property file like
> the mechanism coded in the static initializer of the SimpleLog class for
> instance.

I think this would be a really really bad idea.  The whole point of
commons-logging is to be a portable wrapper around the *logging* calls,
not around the *configuration* calls.

> If not, like you mentionned, coding the LogManager.readConfiguration() in
> the ServletContextListener do the trick. Adding a search for the property
> file ( the like ) and calling this
> method with the found file, would it be a violation of the philosophy of
> commons-logging?


When you make the choice that "this particular app is going to use JDK
1.4" logging, you are also taking the responsibility to configure it
appropriately.  Later, if you change your mind and want to use Log4J
instead, then all you need to do is tweak the configuration stuff -- the
logging calls stay the same.  That is all commons-logging was ever
intended to do, and any attempt to get into configuration will just be
duplicating facilities that the logging implementations already provide.

> Thx again.
> Eric.


View raw message