Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-12808

Add LOG.isDebugEnabled() guard for LOG.debug("...")

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.1.0
    • None
    • None
    • Reviewed

    Description

      I am conducting research on log related bugs. I tried to make a tool to fix repetitive yet simple patterns of bugs that are related to logs. In this file, there is a debug level logging statement containing multiple string concatenation without the if statement before them:

      hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestCachingStrategy.java, LOG.debug("got fadvise(offset=" + offset + ", len=" + len +",flags=" + flags + ")");, 82

      Would you be interested in adding the if, to the logging statement?

      Attachments

        1. HDFS-12808.01.patch
          2 kB
          Bharat Viswanadham
        2. HDFS-12808.00.patch
          2 kB
          Bharat Viswanadham

        Issue Links

          Activity

            People

              bharat Bharat Viswanadham
              MehranHassani Mehran Hassani
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: