logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy McBride" <andy.mcbr...@pcmsgroup.com>
Subject Re: Log4j-1.3 autoconfiguration default?
Date Fri, 03 Dec 2004 01:00:18 GMT
Please don't allow log4j to throw any unnecessary 
RuntimeException's be they NullPointers or 

According to the log4j FAQ question 1.2:

"log4j will not throw unexpected exceptions at run-time 
potentially causing your application to crash. If for any 
reason, log4j throws an uncaught exception, please send an 
email to the log4j-user@logging.apache.org mailing list. 
Uncaught exceptions are handled as serious bugs requiring 
immediate attention"

Simply documenting the problem will not help.  

"... the RepositorySelector API is designed to be used by 
developers of Application Servers or 1st class passengers 
on the clue train..." - I would hope that there are more 
than 5 of these currently on planet earth and that some of 
them are capable of mistakes too!  Far too many people 
only get round to reading the docs after the problem has 

If I supply log4j with an invalid config file I do not 
expect it to crash the appserver, similarly if I 
programatically configure log4j RS incorrectly I also do 
not expect it to crash the appserver.  

Putting my Miss Piggy hat on, I think I would always 
prefer log4j to ignore me and carry on with its existing 
basic default behaviour if I tried to instruct it to do 
something silly.  A specific checked exception could be 
(self-f)logged pointing to the exact problem with the 

These are just my humble opinions, please let the debate 
on this run a bit longer.  



On Fri, 03 Dec 2004 07:42:59 +1100
  Paul Smith <psmith@aconex.com> wrote:
>Any reason why?  NPE's are not useful to the end user.
>Ceki Gülcü wrote:
>> May I ask you to defer this discussion to later?
>> At 09:45 PM 12/1/2004, Paul Smith wrote:
>>> Can we at the VERY least NOT let the user try to 
>>>decipher a 
>>> NullPonterException.
>>> Isn't there some way we can detect this situation (since 
>>>we clearly 
>>> know that it can happen from this discussion), and then 
>>>throw some 
>>> sort of more informative Exception (my vote would be 
>>> IllegalStateException) with some detailed message giving 
>>>those users 
>>> who perhaps stepped onto the cluetrain illegally (maybe 
>>>they didn't 
>>> pay?) a bit of a helping hand.
>>> If Kermit the Frog (running out of proverbial users I 
>>>think) saw a 
>>> NPE, he'd immediately associate that with a bug in log4j 
>>>code (even 
>>> though he's wrong).  Lets be a bit more open about it.
>>> cheers,
>>> Paul Smith
>*Paul Smith
>*Software Architect
>* 31 Drummond Street, Carlton, VIC 3053, Australia
>*Tel: +61 3 9661 0200  *Fax: +61 3 9654 9946
>Email: psmith@aconex.com  www.aconex.com**
>This email and any attachments are intended solely for 
>the addressee. The contents may be privileged, 
>confidential and/or subject to copyright or other 
>applicable law. No confidentiality or privilege is lost 
>by an erroneous transmission. If you have received this 
>e-mail in error, please let us know by reply e-mail and 
>delete or destroy this mail and all copies. If you are 
>not the intended recipient of this message you must not 
>disseminate, copy or take any action in reliance on it. 
>The sender takes no responsibility for the effect of this 
>message upon the recipient's computer system.**
>To unsubscribe, e-mail: 
>For additional commands, e-mail: 

The information contained in this e-mail is intended only for the person or
entity to which it is addressed and may contain confidential and/or
privileged material.  If You are not the intended recipient of this e-mail,
the use of this information or any disclosure, copying or distribution is
Prohibited and may be unlawful.  If you received this in error, please
contact the sender and delete the material from any computer.  The views
expressed in this e-mail may not necessarily be the views of The PCMS Group
plc and should not be taken as authority to carry out any instruction

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message