You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Niall Pemberton (JIRA)" <ji...@apache.org> on 2007/04/19 17:29:15 UTC

[jira] Created: (JCI-46) Add Guard conditions to logging statements

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


[jira] Closed: (JCI-46) Add Guard conditions to logging statements

Posted by "Torsten Curdt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCI-46?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Torsten Curdt closed JCI-46.
----------------------------

    Resolution: Won't Fix

https://issues.apache.org/jira/browse/JCI-49

> 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