kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ismael Juma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-5703) allow debug-level logging for RequestChannel's request logger
Date Fri, 04 Aug 2017 18:27:00 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-5703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16114775#comment-16114775
] 

Ismael Juma commented on KAFKA-5703:
------------------------------------

Fixed in https://github.com/apache/kafka/commit/4086db472d08f6dee4d30dda82ab9ff7b67d1a20

> allow debug-level logging for RequestChannel's request logger
> -------------------------------------------------------------
>
>                 Key: KAFKA-5703
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5703
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Onur Karaman
>            Assignee: Onur Karaman
>
> Git hash d25671884bbbdf7843ada3e7797573a00ac7cd56 introduced a bug in RequestChannel's
request logger that causes debug-level logging to never occur.
> {code}
> -      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(true), 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(false), connectionId, totalTime, requestQueueTime, apiLocalTime,
apiRemoteTime, responseQueueTime, responseSendTime, securityProtocol, session.principal))
> +      if (requestLogger.isDebugEnabled) {
> +        val detailsEnabled = 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,listener:%s"
> +          .format(requestDesc(detailsEnabled), connectionId, totalTime, requestQueueTime,
apiLocalTime, apiRemoteTime, responseQueueTime, responseSendTime, securityProtocol, session.principal,
listenerName.value))
> +      }
> {code}
> So trace-level logging is used even if debug-level logging is specified, causing users
to not see the non-detailed request logs.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message