tombentley commented on a change in pull request #9266:
URL: https://github.com/apache/kafka/pull/9266#discussion_r485671503



##########
File path: core/src/test/scala/kafka/utils/LoggingTest.scala
##########
@@ -58,4 +60,20 @@ class LoggingTest extends Logging {
 
     assertEquals(logging.getClass.getName, logging.log.underlying.getName)
   }
+
+  @Test
+  def testLoggerLevelIsResolved(): Unit = {
+    val controller = new Log4jController()
+    val previousLevel = controller.getLogLevel("kafka")
+    try {
+      controller.setLogLevel("kafka", "TRACE")

Review comment:
       @dongjinleekr that would be fine for the `setLogLevel()` and 
`assertEquals` calls, but there would still be the level name in the 
`assertTrue(...contains("kafka=TRACE"))` calls. I think fixing it there would 
make the code harder to read, and given that the declaration of `TRACE` is in 
an external API on which we depend, and the name will not change there doesn't 
seem to be any benefit to using the declaration rather than the name as a 
literal.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to