commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCI-46) Add Guard conditions to logging statements
Date Thu, 19 Apr 2007 15:29:15 GMT
Add Guard conditions to logging statements
------------------------------------------

                 Key: JCI-46
                 URL: https://issues.apache.org/jira/browse/JCI-46
             Project: Commons JCI
          Issue Type: Improvement
          Components: compiler eclipse, compiler groovy, compiler janino, compiler javac,
compiler jsr199, compiler jython, compiler rhino, core, fam
    Affects Versions: 1.0RC2
            Reporter: Niall Pemberton
            Priority: Minor


The lack of Guard conditions on logging statements that concatenate objects to create the
logging output results in unecessary StringBuffer creation when the logging level is below
the threshold set.

Would be a good idea IMO to change statements like:

    log.debug(getId() + " found class: " + name  + " (" + clazzBytes.length + " bytes)");

to

    if (log.isDebugEnabled()) {
        log.debug(getId() + " found class: " + name  + " (" + clazzBytes.length + " bytes)");
    }



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message