dengziming commented on code in PR #12194:
URL: https://github.com/apache/kafka/pull/12194#discussion_r879997413


##########
core/src/main/scala/kafka/network/SocketServer.scala:
##########
@@ -242,13 +241,14 @@ class SocketServer(val config: KafkaConfig,
   }
 
   private def endpoints = config.listeners.map(l => l.listenerName -> l).toMap
+  private def endpointLogContext(endpoint: EndPoint): LogContext = new 
LogContext(s"[$logPrefix, listener=${endpoint.listenerName.value}] ")
 
   protected def createDataPlaneAcceptor(endPoint: EndPoint, 
isPrivilegedListener: Boolean, requestChannel: RequestChannel): 
DataPlaneAcceptor = {
-    new DataPlaneAcceptor(this, endPoint, config, nodeId, connectionQuotas, 
time, isPrivilegedListener, requestChannel, metrics, credentialProvider, 
logContext, memoryPool, apiVersionManager)
+    new DataPlaneAcceptor(this, endPoint, config, nodeId, connectionQuotas, 
time, isPrivilegedListener, requestChannel, metrics, credentialProvider, 
endpointLogContext(endPoint), memoryPool, apiVersionManager)

Review Comment:
   We have 2 abstract methods in Acceptor:
   ```
     def metricPrefix(): String
     def threadPrefix(): String
   ```
   how about adding another similar method: `def logPrefix(): String`
   



-- 
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