Commons JCI
  1. Commons JCI
  2. JCI-46

Add Guard conditions to logging statements

    Details

      Description

      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)"); }

        Activity

        Show
        Torsten Curdt added a comment - https://issues.apache.org/jira/browse/JCI-49

          People

          • Assignee:
            Unassigned
            Reporter:
            Niall Pemberton
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development