-
Notifications
You must be signed in to change notification settings - Fork 436
Description
Hello!
I'm using the latest version of Spring Cloud Contract (4.0.3) with Spring Boot 3.1.0 with slf4j-api 2.0.7 with log4j 2.19.0.
I have a very simple stub runner run by annotation (@AutoConfigureStubRunner), with embedded wiremock run on random port and it works pretty well, but I can't see any logs from WireMock.
According to this article is should work out of the box, but it doesn't in my case.
I debugged a little and I found that the reason is that wiremock-jre8-standalone uses its own copy of slf4j classes prefixed with wiremock package (e.g. wiremock.org.slf4j.Logger) so my log configuration can't work with it and finally NOPLogger from wiremock.org.slf4j package is used.
I didn't find any way to make logger working. I even tried to replace wiremock-jre8-standalone and use a standard wiremock-jre8, but it is not possible - some classes e.g. HandlebarsTemplateProcessor uses repacked dependencies from standalone version of wiremock.
Did I miss something?
Is there any way to make it working?