mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 04:50:33 +01:00
Feature: Add logging of incoming request and body for tracability #109
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MartijnSips on GitHub (Jun 22, 2018).
When you have enabled the Consolelogger, it would be quite handy to log incomming requests (method, url and body) as well as the returning body if a mapping was found.
@MartijnSips commented on GitHub (Jun 22, 2018):
Example code for WireMockMiddleWare.cs line 56:
and then you also need to modify the WireMockConsoleLogger.cs, namely the Format method:
@StefH commented on GitHub (Jun 23, 2018):
I did extend the
IWireMockLogger.cswith a new method. This is also implemented in the defaultWireMockConsoleLogger.cs. However if you want to control in more details how and what is logged, just create your own console logger.