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

        Niall Pemberton created issue -
        Show
        Torsten Curdt added a comment - https://issues.apache.org/jira/browse/JCI-49
        Torsten Curdt made changes -
        Field Original Value New Value
        Resolution Won't Fix [ 2 ]
        Status Open [ 1 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development