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

http://issues.apache.org/bugzilla/show_bug.cgi?id=30201

Overload debub, info, etc. method

           Summary: Overload debub, info, etc. method
           Product: Log4j
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Other
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


It is very current to have log statement like this :
log.debug("x="+x);

The problem is that, even if the trace is disabled, there is "a lot" of
processing performed before before the API check if the log is active
(transformation of X into a string and construction of a StringBuffer).

That could be easily avoided if we could write :
log.debug("x=",x)

with the overloaded debug function being something like this

void debug(Object o1, Object o2)
{
if (isDebugEnabled()) debug("" + o1 + o2);
}

or

void debug(String o1, Object o2)
{
if (isDebugEnabled()) debug(o1 + o2);
}


The same is of curse true for the other method Logger.info, Logger.warning, etc.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to