Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable verbose logging in non standalone wiremock

Tags:

wiremock

I see that there are instructions on enabling verbose logging for wiremock when running it in standalone fashion at http://wiremock.org/running-standalone.html (see --verbose).

How do I enable the same when starting it from a java code?

like image 981
Superaghu Avatar asked Dec 23 '15 01:12

Superaghu


People also ask

What is WireMock standalone?

WireMock can be used to run as a standalone mock server or use it as a library by any JVM application. WireMock has web server at its core that can be used to serve canned responses to particular requests (stubbing) and that captures incoming requests so that they can be checked later (verification).

What is WireMock jre8?

A web service test double for all occasions. License. Apache 2.0.

What is logging verbose?

In software, verbose logging is the practice of recording to a persistent medium as much information as you possibly can about events that occur while the software runs. It's also worth mentioning that verbose logging is generally a mode that you can toggle on and off.


1 Answers

If you're using a JUnit Rule, you can set the notifier to verbose mode like this:

@Rule
public WireMockRule serviceMock = new WireMockRule(new WireMockConfiguration().notifier(new Slf4jNotifier(true)));
like image 54
Jason Avatar answered Sep 27 '22 18:09

Jason