This makes sense.

IMO there should be a mandatory parameter asking what policy should
be followed - the programmer using the API MUST decide.


Have fun,
Paulo Gaspar


http://www.krankikom.de
http://www.ruhronline.de


> -----Original Message-----
> From: James Strachan [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, February 03, 2002 9:05 AM
> To: Jakarta Commons Developers List
> Subject: Re: Problems with commons-logging
>
>
> From: "Steve Downey" <[EMAIL PROTECTED]>
> > 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:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to