frankvicky commented on code in PR #17373:
URL: https://github.com/apache/kafka/pull/17373#discussion_r1812209524


##########
core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala:
##########
@@ -3076,72 +3083,59 @@ class PlaintextAdminIntegrationTest extends 
BaseAdminIntegrationTest {
 
   @ParameterizedTest
   @ValueSource(strings = Array("kraft"))
-  @Disabled // To be re-enabled once KAFKA-8779 is resolved
   def testIncrementalAlterConfigsForLog4jLogLevels(quorum: String): Unit = {
     client = createAdminClient
 
+    val ancestorLogger = "kafka";
     val initialLoggerConfig = describeBrokerLoggers()
-    val initialRootLogLevel = 
initialLoggerConfig.get(Log4jController.ROOT_LOGGER).value()
-    assertEquals(initialRootLogLevel, 
initialLoggerConfig.get("kafka.controller.KafkaController").value())
-    assertEquals(initialRootLogLevel, 
initialLoggerConfig.get("kafka.log.LogCleaner").value())
-    assertEquals(initialRootLogLevel, 
initialLoggerConfig.get("kafka.server.ReplicaManager").value())
-
-    val newRootLogLevel = LogLevelConfig.DEBUG_LOG_LEVEL
-    val alterRootLoggerEntry = Seq(
-      new AlterConfigOp(new ConfigEntry(Log4jController.ROOT_LOGGER, 
newRootLogLevel), AlterConfigOp.OpType.SET)
+    val initialKafkaLogLevel = initialLoggerConfig.get("kafka").value()
+    assertEquals(initialKafkaLogLevel, 
initialLoggerConfig.get("kafka.server.ControllerServer").value())
+    assertEquals(initialKafkaLogLevel, 
initialLoggerConfig.get("kafka.log.LogCleaner").value())
+    assertEquals(initialKafkaLogLevel, 
initialLoggerConfig.get("kafka.server.ReplicaManager").value())

Review Comment:
   We could, but to make the test more precise, we should avoid having the test 
depend on the root logger. We are now focusing on changing the log level of the 
`kafka` logger, which acts as the top-level logger for the 
`kafka.server.ControllerServer`, `kafka.log.LogCleaner`, and 
`kafka.server.ReplicaManager` components. This change ensures that we can still 
control Kafka's logging behavior without relying on the root logger.



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