diff --git a/core/runtime/src/main/java/io/quarkus/runtime/graal/DisableLoggingFeature.java b/core/runtime/src/main/java/io/quarkus/runtime/graal/DisableLoggingFeature.java index 2b5565c8015ef..21476699598fc 100644 --- a/core/runtime/src/main/java/io/quarkus/runtime/graal/DisableLoggingFeature.java +++ b/core/runtime/src/main/java/io/quarkus/runtime/graal/DisableLoggingFeature.java @@ -12,32 +12,47 @@ */ public class DisableLoggingFeature implements Feature { - private static final String[] CATEGORIES = { - "org.jboss.threads" + /** + * Category to configure to WARNING + */ + private static final String[] WARN_CATEGORIES = { + "org.jboss.threads" }; + + /** + * Category to configure to ERROR + */ + private static final String[] ERROR_CATEGORIES = { + "io.netty.resolver.dns.DnsServerAddressStreamProviders" }; - private final Map categoryMap = new HashMap<>(CATEGORIES.length); + private final Map categoryMap = new HashMap<>(WARN_CATEGORIES.length + ERROR_CATEGORIES.length); @Override public void beforeAnalysis(BeforeAnalysisAccess access) { - for (String category : CATEGORIES) { + for (String category : WARN_CATEGORIES) { Logger logger = Logger.getLogger(category); categoryMap.put(category, logger.getLevel()); logger.setLevel(Level.WARNING); } + + for (String category : ERROR_CATEGORIES) { + Logger logger = Logger.getLogger(category); + categoryMap.put(category, logger.getLevel()); + logger.setLevel(Level.SEVERE); + } } @Override public void afterAnalysis(AfterAnalysisAccess access) { - for (String category : CATEGORIES) { - Level level = categoryMap.remove(category); - Logger logger = Logger.getLogger(category); - logger.setLevel(level); + for (Map.Entry entry : categoryMap.entrySet()) { + Logger logger = Logger.getLogger(entry.getKey()); + logger.setLevel(entry.getValue()); } + categoryMap.clear(); } @Override public String getDescription() { - return "Disables INFO logging during the analysis phase"; + return "Adapts logging during the analysis phase"; } }