kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: MINOR: Reduce logging level
Date Fri, 07 Jul 2017 20:43:39 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 35f9fa804 -> bb8eff1e7


MINOR: Reduce logging level

Author: Eno Thereska <eno.thereska@gmail.com>

Reviewers: Matthias J. Sax <matthias@confluent.io>, Guozhang Wang <wangguoz@gmail.com>

Closes #3505 from enothereska/minor-less-logs


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/bb8eff1e
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/bb8eff1e
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/bb8eff1e

Branch: refs/heads/trunk
Commit: bb8eff1e70491c4ce2dad07249d769b467f4068e
Parents: 35f9fa8
Author: Eno Thereska <eno.thereska@gmail.com>
Authored: Fri Jul 7 13:43:32 2017 -0700
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Fri Jul 7 13:43:32 2017 -0700

----------------------------------------------------------------------
 .../apache/kafka/streams/state/internals/ThreadCache.java | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/bb8eff1e/streams/src/main/java/org/apache/kafka/streams/state/internals/ThreadCache.java
----------------------------------------------------------------------
diff --git a/streams/src/main/java/org/apache/kafka/streams/state/internals/ThreadCache.java
b/streams/src/main/java/org/apache/kafka/streams/state/internals/ThreadCache.java
index 867473f..31fb3bb 100644
--- a/streams/src/main/java/org/apache/kafka/streams/state/internals/ThreadCache.java
+++ b/streams/src/main/java/org/apache/kafka/streams/state/internals/ThreadCache.java
@@ -96,9 +96,10 @@ public class ThreadCache {
         }
         cache.flush();
 
-        if (log.isTraceEnabled())
+        if (log.isTraceEnabled()) {
             log.trace("{} Cache stats on flush: #puts={}, #gets={}, #evicts={}, #flushes={}",
-                    logPrefix, puts(), gets(), evicts(), flushes());
+                logPrefix, puts(), gets(), evicts(), flushes());
+        }
     }
 
     public LRUCacheEntry get(final String namespace, Bytes key) {
@@ -216,8 +217,9 @@ public class ThreadCache {
             numEvicts++;
             numEvicted++;
         }
-
-        log.debug("{} Evicted {} entries from cache {}", logPrefix, numEvicted, namespace);
+        if (log.isTraceEnabled()) {
+            log.trace("{} Evicted {} entries from cache {}", logPrefix, numEvicted, namespace);
+        }
     }
 
     private synchronized NamedCache getCache(final String namespace) {


Mime
View raw message