Onur Karaman created KAFKA-5703: ----------------------------------- Summary: 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)