suneet-s commented on code in PR #14094:
URL: https://github.com/apache/druid/pull/14094#discussion_r1167648103
##########
indexing-service/src/main/java/org/apache/druid/indexing/common/tasklogs/ConsoleLoggingEnforcementConfigurationFactory.java:
##########
@@ -117,14 +117,15 @@ private Appender findConsoleAppender()
}
/**
- * remove all appenders from a logger and append a console appender to it
+ * Ensure there is a console logger defined. Without a console logger peon
logs wont be able to be stored in deep storage
*/
private void applyConsoleAppender(LoggerConfig logger, Appender
consoleAppender)
{
- if (logger.getAppenderRefs().size() == 1
- &&
logger.getAppenderRefs().get(0).getRef().equals(consoleAppender.getName())) {
- // this logger has only one appender and its the console appender
- return;
+ for (AppenderRef appenderRef : logger.getAppenderRefs()) {
+ if (consoleAppender.getName().equals(appenderRef.getRef())) {
+ // we need a console logger no matter what, but we want to be able
to define a different appender if necessary
+ return;
+ }
}
Review Comment:
Can we add some way of notifying the Druid operator that their log4j
appenderator config is being overwritten because they are missing a console
appender. The notice should tell the operator that if they want their config to
stick, they must also add the console appender to the 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]