I would like to change the logging of my EmbeddedDatabase. Atm every time I open a connection it logs "... Creating new JDBC Driver Connection to ...". In my test suite, I open for every request a new connection, and now there are way too many of these messages.
EmbeddedDatabase embeddedDatabase = new EmbeddedDatabaseBuilder()
.generateUniqueName(true)
.setType(EmbeddedDatabaseType.H2)
.build();
...
Connection connection = embeddedDatabase.getConnection();
I didn't find any kind of log level. I just can set the PrintWriter. But I wanna see the error msgs. I run this outside of spring as a regular unit test.
Any ideas?
It seem like the getConnection method from the EmbeddedDatabase and from the DriverManager create a different log strategie for the connection. The default config fits for my problem. So the code would look like this:
More options: https://h2database.com/html/features.html#trace_options