You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 7, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 7, 2026. It is now read-only.
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?
Activity
copbint commentedon Jul 25, 2023
I have come across this issue too, and can't find solution.
marcingrzejszczak commentedon Sep 4, 2023
Do you have a small project that replicates this issue?
tgeens commentedon Sep 5, 2023
Trying this (in my webflux project) gives 0 wiremock logging.
I tried setting
logging.level.WireMock=DEBUGetc, but that gives the same result.tgeens commentedon Sep 5, 2023
As a workaround, I switched to the
ConsoleNotifierand this works as expected:That reduces the logging-problem to a slf4j/logback config issue? π€
adamsmith118 commentedon Sep 5, 2023
Presumably it's defaulting
NOPLogger, which wouldn't write anything...Fixed logging issues in WireMock