Skip to content

Commit 81a7c4b

Browse files
committed
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. ```
1 parent cfd2a75 commit 81a7c4b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

extensions/agroal/runtime/src/main/java/io/quarkus/agroal/runtime/AgroalEventLoggingListener.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@ public void onConnectionDestroy(Connection connection) {
6767

6868
@Override
6969
public void onWarning(String warning) {
70-
log.warnv("{0}: {1}", datasourceName, warning);
70+
// See https://github.com/quarkusio/quarkus/issues/44047
71+
if (warning != null && warning.contains("JDBC resources leaked")) {
72+
log.debugv("{0}: {1}", datasourceName, warning);
73+
} else {
74+
log.warnv("{0}: {1}", datasourceName, warning);
75+
}
7176
}
7277

7378
@Override

0 commit comments

Comments
 (0)