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

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development