Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-9661

Consistent log severity level guards and statements

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.95.2
    • 0.98.0, 0.96.0
    • None
    • None
    • Reviewed

    Description

      A log statement should be guarded by its matching severity level. A log statement like

      if (LOG.isTraceEnabled()) {
      LOG.debug(identifier + " opening connection to ZooKeeper ensemble=" + ensemble);

      doesn't make much sense because the log message is only printed out when TRACE-level is enabled. This inconsistency was possibly introduced when developers demoted the original log statement from DEBUG but forgot to change its corresponding log severity level.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jackie.chang Jackie Chang Assign to me
            jackie.chang Jackie Chang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment