logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 11403] New: - new logger level of ignore?
Date Fri, 02 Aug 2002 07:34:11 GMT
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:   <mailto:log4j-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-dev-help@jakarta.apache.org>


Mime
View raw message