avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 20187] - log(pri,msg) does not check enabled flag
Date Mon, 26 May 2003 17:25:23 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=20187>.
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=20187

log(pri,msg) does not check enabled flag

jkb@stian.freeserve.co.uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |



------- Additional Comments From jkb@stian.freeserve.co.uk  2003-05-26 17:25 -------
I agree that checking the priority in log(p,m) before passing the call to log
(p,m,t) just adds an extra check.

However what I intended to suggest was to check the priority before calling 
output() - not log(). The extra method call(s) then disappear.

That is how the pairs of info(), [etc] methods are currently coded, except 
that they use isInfoEnabled() [etc] to check the flag.

To make the two log() calls consistent with info(), debug() etc, the log() 
calls could (should?) be recoded as:

    public final void log( final Priority priority, final String message, 
Throwable throw )
    {
        if ( isPriorityEnabled( priority ) )
        {
            output( priority, message, throw );
        }
    }

and

    public final void log( final Priority priority, final String message )
    {
        if ( isPriorityEnabled( priority ) )
        {
            output( priority, message, null );
        }
    }

Not a vital change. But it would make the code more consistent.

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


Mime
View raw message