Merge branch 'stable-2.14' into stable-2.15

* stable-2.14:
  CreateReviewNotes: Use Logger's built-in string formatting

Change-Id: I2d2dd1d24734cc43997cceb7efd57fc72b415d06
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
index 33915e1..300baa4 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/CreateReviewNotes.java
@@ -108,9 +108,9 @@
     ProjectState projectState = projectCache.get(project);
     if (projectState == null) {
       log.error(
-          "Could not obtain available labels for project "
-              + project.get()
-              + ". Expect missing labels in its review notes.");
+          "Could not obtain available labels for project {}."
+              + " Expect missing labels in its review notes.",
+          project.get());
       this.labelTypes = new LabelTypes(Collections.<LabelType>emptyList());
     } else {
       this.labelTypes = projectState.getLabelTypes();
@@ -162,8 +162,11 @@
             getMessage().append("* ").append(c.getShortMessage()).append("\n");
           }
         } else {
-          log.debug(
-              "no note for this commit since it is a direct push: " + c.getName().substring(0, 7));
+          if (log.isDebugEnabled()) {
+            log.debug(
+                "no note for this commit since it is a direct push {}",
+                c.getName().substring(0, 7));
+          }
         }
       }
     }