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


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Loggers.java:
##########
@@ -203,7 +201,7 @@ private void setLevel(org.apache.logging.log4j.Logger 
logger, Level level) {
         LoggerConfig loggerConfig = 
context.getConfiguration().getLoggerConfig(loggerName);
         Level currentLevel = loggerConfig.getLevel();
 
-        if (level.equals(currentLevel)) {
+        if (lastModifiedTimes.containsKey(loggerName) && 
level.equals(currentLevel)) {

Review Comment:
   Hi @chia7712,
   I have noticed that the javadoc of `setLevel` states that the method will 
only return the loggers affected by this method.
   IMHO, maybe we should keep the key check to prevent the output from 
containing null values.
   WDYT?



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