mariaDB connector/J v3.0.6 is dumping SQLExceptions to the console. How can I stop this?

Viewed 20

We have a legacy application that is being transitioned from MySQL v5.6 to MariaDB 10.8. This application uses a home grown logger ( enough said ). However, when SQL commands like preparedStatement.executeQuery() are run, any SQLException that is generated is being mirrored to the console ( I assume via stderr ). How can I stop this extra noise. The exception is trapped and handled, but the extra console noise is annoying.

1 Answers

MariaDB java connector since 3.0 is using Slf4j logger if present, falling back on console if not.

This can be disabled setting System property "mariadb.logging.disable" to true. example :

java -Dmariadb.logging.disable=true ...
Related