From 089c3535782ebdef996ff92de537baa40831fa20 Mon Sep 17 00:00:00 2001 From: George Gastaldi Date: Tue, 14 Jan 2025 13:19:04 -0300 Subject: [PATCH] Adjust logging level for JDBC resource leak warnings ``` - Adjust JDBC resource leak logging to use debug level instead of warnings for better log granularity. - Enhance developer experience by reducing noise in application logs. ``` --- .../quarkus/agroal/runtime/AgroalEventLoggingListener.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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