kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gwens...@apache.org
Subject kafka git commit: KAFKA-2461; request logger no longer logs extra information in debug mode
Date Thu, 03 Sep 2015 05:07:11 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 9223155e9 -> 24da54272


KAFKA-2461; request logger no longer logs extra information in debug mode

Author: asingh <asingh@cloudera.com>

Reviewers: Gwen Shapira

Closes #169 from SinghAsDev/KAFKA-2461


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

Branch: refs/heads/trunk
Commit: 24da542727225c7920ad974582fdca222a38ccc2
Parents: 9223155
Author: asingh <asingh@cloudera.com>
Authored: Wed Sep 2 22:07:05 2015 -0700
Committer: Gwen Shapira <cshapi@gmail.com>
Committed: Wed Sep 2 22:07:05 2015 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/network/RequestChannel.scala | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/24da5427/core/src/main/scala/kafka/network/RequestChannel.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/network/RequestChannel.scala b/core/src/main/scala/kafka/network/RequestChannel.scala
index 37d9e1f..5067d1d 100644
--- a/core/src/main/scala/kafka/network/RequestChannel.scala
+++ b/core/src/main/scala/kafka/network/RequestChannel.scala
@@ -77,14 +77,14 @@ object RequestChannel extends Logging {
     buffer = null
     private val requestLogger = Logger.getLogger("kafka.request.logger")
 
-    private def requestDesc: String = {
+    private def requestDesc(details: Boolean): String = {
       if (requestObj != null)
-        requestObj.describe(false)
+        requestObj.describe(details)
       else
         header.toString + " -- " + body.toString
     }
 
-    trace("Processor %d received request : %s".format(processor, requestDesc))
+    trace("Processor %d received request : %s".format(processor, requestDesc(false)))
 
     def updateRequestMetrics() {
       val endTimeMs = SystemTime.milliseconds
@@ -118,10 +118,10 @@ object RequestChannel extends Logging {
 
       if(requestLogger.isTraceEnabled)
         requestLogger.trace("Completed request:%s from connection %s;totalTime:%d,requestQueueTime:%d,localTime:%d,remoteTime:%d,responseQueueTime:%d,sendTime:%d,securityProtocol:%s,principal:%s"
-                .format(requestDesc, connectionId, totalTime, requestQueueTime, apiLocalTime,
apiRemoteTime, responseQueueTime, responseSendTime, securityProtocol, session.principal))
+          .format(requestDesc(false), connectionId, totalTime, requestQueueTime, apiLocalTime,
apiRemoteTime, responseQueueTime, responseSendTime, securityProtocol, session.principal))
       else if(requestLogger.isDebugEnabled)
         requestLogger.debug("Completed request:%s from connection %s;totalTime:%d,requestQueueTime:%d,localTime:%d,remoteTime:%d,responseQueueTime:%d,sendTime:%d,securityProtocol:%s,principal:%s"
-          .format(requestDesc, connectionId, totalTime, requestQueueTime, apiLocalTime, apiRemoteTime,
responseQueueTime, responseSendTime, securityProtocol, session.principal))
+          .format(requestDesc(true), connectionId, totalTime, requestQueueTime, apiLocalTime,
apiRemoteTime, responseQueueTime, responseSendTime, securityProtocol, session.principal))
     }
   }
   


Mime
View raw message