chia7712 commented on a change in pull request #9824:
URL: https://github.com/apache/kafka/pull/9824#discussion_r552457930



##########
File path: core/src/main/scala/kafka/server/AdminManager.scala
##########
@@ -522,20 +522,38 @@ class AdminManager(val config: KafkaConfig,
     if (!validateOnly) {
       if (perBrokerConfig)
         
this.config.dynamicConfig.reloadUpdatedFilesWithoutConfigChange(configProps)
+
+      if (perBrokerConfig)
+        info(s"Updating broker ${brokerId.get} with new configuration : 
${toLoggableProps(resource, configProps).mkString(",")}")
+      else
+        info(s"Updating brokers with new configuration : 
${toLoggableProps(resource, configProps).mkString(",")}")
+
       adminZkClient.changeBrokerConfig(brokerId,
         this.config.dynamicConfig.toPersistentProps(configProps, 
perBrokerConfig))
     }
 
     resource -> ApiError.NONE
   }
 
+  private def toLoggableProps(resource: ConfigResource, configProps: 
Properties): Map[String, String] = {
+    configProps.asScala.map {
+      case (key, value) => (key, KafkaConfig.loggableValue(resource.`type`, 
key, value))
+    }
+  }
+
   private def alterLogLevelConfigs(alterConfigOps: Seq[AlterConfigOp]): Unit = 
{
     alterConfigOps.foreach { alterConfigOp =>
       val loggerName = alterConfigOp.configEntry().name()
       val logLevel = alterConfigOp.configEntry().value()
       alterConfigOp.opType() match {
-        case OpType.SET => Log4jController.logLevel(loggerName, logLevel)
-        case OpType.DELETE => Log4jController.unsetLogLevel(loggerName)
+        case OpType.SET => {

Review comment:
       the braces is redundant.




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

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


Reply via email to