Closed diversit closed 4 weeks ago
Hi @diversit, @derari submitted PR #142 that implements the capabilities you requested, following your suggested solution #1. I've documented the feature and merged it into version 1.4.0
. Would you like to give it a try?
@all-contributors add @derari for code
@chberger
I've put up a pull request to add @derari! :tada:
Tested wiremock logging with version 1.4.0. Works great! Thanks!
Would it be possible to somehow configure the logging of WireMock? Every now and then I'm struggling with why WireMock is returning a 404 instead of the configured stub. Having some kind of logging what WireMock is receiving and sending would be very helpful.
WireMock seems to support 2 ways to capture the request/response or do logging
Notifier
in the WireMockConfigurationRequestListener
on theWireMockServer
instance.Both cannot be set from a
QuarkusTest
since these are no methods on aWireMock
instance and theWireMockServer
is created by theWireMockServerProcessor
of this extension.Unfortunately, the default
Notifier
is set to aSlf4jNotifier
but with averbose=false
setting causing nothing to be logged.Also, there is an issue with the Slf4j logging (issue 2557) which causes the
Slf4jNotifier
always to have aNOPLogger
so nothing will be logged anyway. A proposed solution is to remove Slf4j and use Java Logging instead (PR 2616). But there also theverbose=false
in the default configuration, so still nothing would be logged.Would it be possible to configure a
Notifier
orRequestListener
via theWireMockServerBuildTimeConfig
or can the configuration only use simple types like boolean, int, String, etc? If there is a way, please point me in the right direction and I'm happy to create a PR for this.