chia7712 commented on code in PR #18313:
URL: https://github.com/apache/kafka/pull/18313#discussion_r1898155092


##########
core/src/main/scala/kafka/network/RequestChannel.scala:
##########
@@ -249,14 +254,19 @@ object RequestChannel extends Logging {
       // the total time spent on authentication, which may be significant for 
SASL/SSL.
       recordNetworkThreadTimeCallback.foreach(record => 
record.accept(networkThreadTimeNanos))
 
-      if (isRequestLoggingEnabled) {
+      if (isRequestLoggingEnabled(header)) {
         val desc = RequestConvertToJson.requestDescMetrics(header, 
requestLog.toJava, response.responseLog.toJava,
           context, session, isForwarded,
           totalTimeMs, requestQueueTimeMs, apiLocalTimeMs,
           apiRemoteTimeMs, apiThrottleTimeMs, responseQueueTimeMs,
           responseSendTimeMs, temporaryMemoryBytes,
           messageConversionsTimeMs)
-        requestLogger.debug("Completed request:" + desc.toString)
+        val logPrefix = "Completed request: {}"
+        // log deprecated apis at `info` level to allow them to be selectively 
enabled
+        if (header.apiKey().isVersionDeprecated(header.apiVersion()))

Review Comment:
   Perhaps we can add a helper method to header to directly check for 
deprecated versions, such as `header.isVersionDeprecated()`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to