In a blank spring-boot-2.4.0-SNAPSHOT application, choosing the mariadb driver instead of a mysql driver for r2dbc results in all logs after and some during startup to be swallowed.
Compare output of ./gradlew bootRun
Expected: with mysql driver
> Task :bootRun
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.4.0-SNAPSHOT)
2020-11-10 00:56:10.761 INFO 58158 --- [ main] com.example.demo.DemoApplicationKt : Starting DemoApplicationKt using Java 14.0.1 on (...)
2020-11-10 00:56:10.764 INFO 58158 --- [ main] com.example.demo.DemoApplicationKt : No active profile set, falling back to default profiles: default
2020-11-10 00:56:10.837 WARN 58158 --- [kground-preinit] o.s.h.c.j.Jackson2ObjectMapperBuilder : For Jackson Kotlin classes support please add "com.fasterxml.jackson.module:jackson-module-kotlin" to the classpath
2020-11-10 00:56:11.150 INFO 58158 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data R2DBC repositories in DEFAULT mode.
2020-11-10 00:56:11.156 INFO 58158 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 3 ms. Found 0 R2DBC repository interfaces.
2020-11-10 00:56:11.885 INFO 58158 --- [ main] o.s.b.web.embedded.netty.NettyWebServer : Netty started on port(s): 8080
2020-11-10 00:56:11.893 INFO 58158 --- [ main] com.example.demo.DemoApplicationKt : Started DemoApplicationKt in 1.494 seconds (JVM running for 1.799)
Actual: with mariadb driver
> Task :bootRun
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.4.0-SNAPSHOT)
2020-11-10 | 00:57:20.833 | background-preinit | WARN | o.s.h.c.j.Jackson2ObjectMapperBuilder | For Jackson Kotlin classes support please add "com.fasterxml.jackson.module:jackson-module-kotlin" to the classpath
I understand that this seems pretty weird, but I could boil it down to that in my larger private project and provided a sample repository:
https://github.com/mindhaq/spring-boot-bugreport-24102
Master is fine, branch mariadb
is not.
Spring is starting up fine, by the way. In the non-demo project everything is working, only logging isn't. There, my custom logback-spring.xml is ignored after adding the mariadb driver.
Comment From: snicoll
@mindhaq thanks for the report and the sample. org.mariadb:r2dbc-mariadb:0.8.4-rc
has a logback-test.xml
at the root of the classpath that takes precedence over any other configuration files. Please report this issue to the mariadb-connector-r2dbc project.