avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <david.g...@hic.gov.au>
Subject RE: ConsoleLogger inside AbstractLogEnabled (AbstractLoggable)
Date Thu, 04 Apr 2002 01:22:14 GMT

I should have mentioned to have a look at the default error code on cvs in

"Berin Loritsch" <bloritsch@apache.org> on 03/04/2002 02:24:11

Please respond to "Avalon Developers List" <avalon-dev@jakarta.apache.org>

To:    "'Avalon Developers List'" <avalon-dev@jakarta.apache.org>

Subject:    RE: ConsoleLogger inside AbstractLogEnabled (AbstractLoggable)

Honestly, we should throw a LoggerNotSetException() or something
useful like that.  If you return a NullLogger (swallows all log
events) or a ConsoleLogger (slows everything down by forwarding
events to the screen), you never report a bug to the user.

Furthermore, you are not guaranteed access to the System.out stream.

The LoggerNotSetException approach is cleaner--and forces the
developer to write correct code.  It also gives the developer
a clue as to what the real problem is.

NOTICE - This message is intended only for the use of the 
addressee named above and may contain privileged and 
confidential information.  If you are not the intended recipient
of this message you are hereby notified that you must not 
disseminate, copy or take any action based upon it.  If you 
received this message in error please notify HIC immediately.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of HIC.

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

View raw message