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


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Loggers.java:
##########
@@ -48,14 +47,17 @@ public class Loggers {
 
     private static final Logger log = LoggerFactory.getLogger(Loggers.class);
 
+    private static final String ROOT_LOGGER_NAME = "root";
+
     /**
      * Log4j uses "root" (case-insensitive) as name of the root logger.
      * Note: In log4j, the root logger's name was "root" and Kafka also 
followed that name for dynamic logging control feature.
      *
-     * The root logger's name is changed in log4j2 to empty string (see: 
[[LogManager.ROOT_LOGGER_NAME]]) but for backward-
-     * compatibility. Kafka keeps its original root logger name. It is why 
here is a dedicated definition for the root logger name.
+     * While log4j2 changed the root logger's name to empty string (see: 
[[LogManager.ROOT_LOGGER_NAME]]),
+     * for backward-compatibility purposes, we accept both empty string and 
"root" as valid root logger names.
+     * This is why we have a dedicated definition that includes both values.
      */
-    private static final String ROOT_LOGGER_NAME = "root";
+    private static final List<String> VALID_ROOT_LOGGER_NAMES = 
List.of(LogManager.ROOT_LOGGER_NAME, ROOT_LOGGER_NAME);
 
     private final Time time;
     private final Map<String, Long> lastModifiedTimes;

Review Comment:
   could you please add comments to reminder readers that the logger name of 
"root" is "root"



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to