New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No logs from WireMock #1916
Comments
I have come across this issue too, and can't find solution. |
Do you have a small project that replicates this issue? |
Trying this (in my webflux project) gives 0 wiremock logging. I tried setting |
As a workaround, I switched to the
That reduces the logging-problem to a slf4j/logback config issue? 🤔 |
Presumably it's defaulting |
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?
The text was updated successfully, but these errors were encountered: