commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james_strac...@yahoo.co.uk>
Subject Re: Problems with commons-logging
Date Sun, 03 Feb 2002 08:04:50 GMT
From: "Steve Downey" <steve.downey@netfolio.com>
> The configuration should be done with the logging package API. A component
> is not going to do configuration, the application, or the administrator,
is
> going to. The components need a uniform way of accessing the logging
system
> that the application is using.

Agreed.

> Incidentally, this implies to me that if no logging system is configured,
> then components should not log. It should be a no-op. Not even print to
> stderr. [god forbid stdout]

This I'm not sure of.

Imagine the use case of end user trying to run some application with a
component using commons-logging - but their classpath doesn't have a logging
package on it by accident (its *very* common to mess up classpaths or miss
dependencies, JJAR where are you ;-). Lo and behold the application runs,
terminates due to some failure of some kind but the user can't see what the
issue is. No output is produced whatsoever. Or maybe worse, all the commons
components errors are hidden but application developers errors come out
sending them on a wild goose chase. They have to guess that the issue is
that a logging package is required before they see the real reason for the
application terminating.

Just to fix this common case I'd prefer the default to be SimpleLog with
ERROR level logging to System.err. (Maybe with a small warning on the first
line that no logging package is configured).

If a user really wants to disable all logging (which is quite rare IMHO - if
something goes wrong we usually wanna see it somewhere) they can with the
system properties in SimpleLog.

James


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message