PrologEnvironment: Reduce "setting reductionLimit" log spam

The log message "setting reductionLimit nnn" was emitted on every
call to PrologEnvironment#setPredicate, which in some cases can be
very frequent and thus spams the log.

We're only actually interested in the case where the reduction limit
is getting set to a value other than the default, which is only when
the predicate class is CONSULT_STREAM_2. Move the log statement into
the reductionLimit method, and only emit it in the case where the class
is CONSULT_STREAM_2.

Change-Id: Ief3a4f5fc3bc325cf21d0368d5c01fee0332a668
diff --git a/gerrit-server/src/main/java/com/google/gerrit/rules/PrologEnvironment.java b/gerrit-server/src/main/java/com/google/gerrit/rules/PrologEnvironment.java
index e98e480..f27e349 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/rules/PrologEnvironment.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/rules/PrologEnvironment.java
@@ -82,7 +82,6 @@
   public void setPredicate(Predicate goal) {
     super.setPredicate(goal);
     int reductionLimit = args.reductionLimit(goal);
-    log.debug("setting reductionLimit {}", reductionLimit);
     setReductionLimit(reductionLimit);
   }
 
@@ -212,6 +211,9 @@
 
     private int reductionLimit(Predicate goal) {
       if (goal.getClass() == CONSULT_STREAM_2) {
+        log.debug(
+            "predicate class is CONSULT_STREAM_2: override reductionLimit with compileLimit ({})",
+            compileLimit);
         return compileLimit;
       }
       return reductionLimit;