suneet-s commented on code in PR #14094:
URL: https://github.com/apache/druid/pull/14094#discussion_r1169324083


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/tasklogs/ConsoleLoggingEnforcementConfigurationFactory.java:
##########
@@ -95,6 +100,10 @@ protected void doConfigure()
       loggerConfigList.add(this.getRootLogger());
       loggerConfigList.addAll(this.getLoggers().values());
 
+      // Alter log level for this class to be warning. This needs to happen 
because the logger is using the default
+      // config, which is level error and appends to console, since the logger 
is being configured here.
+      Configurator.setLevel(log.getName(), Level.WARN);

Review Comment:
   Is there a reason not to do this in the static initialization block? near 
line 55. IMO that would be easier to follow



##########
indexing-service/src/main/java/org/apache/druid/indexing/common/tasklogs/ConsoleLoggingEnforcementConfigurationFactory.java:
##########
@@ -143,6 +152,7 @@ private void applyConsoleAppender(LoggerConfig logger, 
Appender consoleAppender)
         // use the first appender's definition
         level = appenderRef.getLevel();
         filter = appenderRef.getFilter();
+        log.warn("Clearing all configured appenders for logger %s. Using 
ConsoleAppender instead.", logger.getName());

Review Comment:
   ```suggestion
           log.warn("Clearing all configured appenders for logger %s. Using %s 
instead.", logger.getName(), consoleAppender.getName());
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to