diff --git a/extensions/agroal/runtime/src/main/java/io/quarkus/agroal/runtime/AgroalEventLoggingListener.java b/extensions/agroal/runtime/src/main/java/io/quarkus/agroal/runtime/AgroalEventLoggingListener.java index c0959df54864f..9cacdecd83d70 100644 --- a/extensions/agroal/runtime/src/main/java/io/quarkus/agroal/runtime/AgroalEventLoggingListener.java +++ b/extensions/agroal/runtime/src/main/java/io/quarkus/agroal/runtime/AgroalEventLoggingListener.java @@ -67,7 +67,12 @@ public void onConnectionDestroy(Connection connection) { @Override public void onWarning(String warning) { - log.warnv("{0}: {1}", datasourceName, warning); + // See https://github.com/quarkusio/quarkus/issues/44047 + if (warning.contains("JDBC resources leaked")) { + log.debugv("{0}: {1}", datasourceName, warning); + } else { + log.warnv("{0}: {1}", datasourceName, warning); + } } @Override