Skip to content

Commit

Permalink
Fix double override log lone
Browse files Browse the repository at this point in the history
  • Loading branch information
tgracchus committed May 2, 2024
1 parent 285b519 commit 6728dda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/hivemq/bootstrap/LoggingBootstrap.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public static void initLogging(final @NotNull File configFolder) {
reEnableDefaultAppenders();
context.addTurboFilter(LOG_LEVEL_MODIFIER_TURBO_FILTER);
}
redirectJULToSLF4J();
logQueuedEntries();
redirectJULToSLF4J();

reset();
// must be added here, as addLoglevelModifiers() is much to late
Expand Down Expand Up @@ -164,7 +164,7 @@ private static boolean tryToOverrideLogbackXml(final @NotNull File configFolder)
final JoranConfigurator configurator = new JoranConfigurator();
configurator.setContext(context);
configurator.doConfigure(file);

LIST_APPENDER.setContext(context);
LIST_APPENDER.start();
context.getLogger(Logger.ROOT_LOGGER_NAME).addAppender(LIST_APPENDER);
log.info("Log Configuration was overridden by {}", file.getAbsolutePath());
Expand Down

0 comments on commit 6728dda

Please sign in to comment.