You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2002/08/02 09:34:11 UTC

DO NOT REPLY [Bug 11403] New: - new logger level of ignore?

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11403>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11403

new logger level of ignore?

           Summary: new logger level of ignore?
           Product: Log4j
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Other
        AssignedTo: log4j-dev@jakarta.apache.org
        ReportedBy: gregw@mortbay.org


I'd like to suggest a new logger level above trace called ignore.
Ignore logs are for events that are ignored by the program and are not expected to
be needed by the programmer.   The most appropriate use for them is to allow empty
catch blocks to be avoided:

catch(Exception e)
{
   log.ignore(e);
}

This style has the dual benefits of making the exception handling clear in the 
code.  Plus if it turns out that the exception should not have been ignored,
then logging can be turned up to ignore level and these exceptions will appear
in the log.

I know this can be done with info,debug or trace but my experience with these
is that other developers get concerned if they see exceptions in a debug log.
The sight of a stack trace send people into panic even if the comment before it
says ignore.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>