This library is super useful, but it's been hard to debug because requests and responses are not being logged.
Ideally, we'd like to not log by default, but log when debugging is enabled somehow. This is our current setup:
We use version 1.7.4 but 1.19.0 also doens't log. We do see the server configation logged:
SeedExhaustive.Test.Unit.MockServer.Endpoints.Container.GetAndReturnListOfObjectsTest
[MockServer Info] By Stef Heyenrath (https://github.com/WireMock-Net/WireMock.Net)
12/17/2025 11:35:35 PM [Info] : By Stef Heyenrath (https://github.com/WireMock-Net/WireMock.Net)
[MockServer Debug] Server settings {
"Port": null,
"UseSSL": null,
"HostingScheme": null,
"UseHttp2": null,
"StartAdminInterface": null,
"ReadStaticMappings": null,
"WatchStaticMappings": null,
"WatchStaticMappingsInSubdirectories": null,
"ProxyAndRecordSettings": null,
"Urls": null,
"StartTimeout": 10000,
"AllowPartialMapping": null,
"AdminUsername": null,
"AdminPassword": null,
"AdminAzureADTenant": null,
"AdminAzureADAudience": null,
"RequestLogExpirationDuration": null,
"MaxRequestLogCount": null,
"CorsPolicyOptions": null,
"AllowCSharpCodeMatcher": null,
"AllowBodyForAllHttpMethods": null,
"AllowOnlyDefinedHttpStatusCodeInResponse": null,
"DisableJsonBodyParsing": null,
"DisableRequestBodyDecompressing": null,
"DisableDeserializeFormUrlEncoded": null,
"HandleRequestsSynchronously": null,
"CertificateSettings": null,
"CustomCertificateDefined": false,
"ClientCertificateMode": 0,
"AcceptAnyClientCertificate": false,
"WebhookSettings": null,
"UseRegexExtended": true,
"SaveUnmatchedRequests": null,
"DoNotSaveDynamicResponseInLogEntry": null,
"QueryParameterMultipleValueSupport": null,
"ProtoDefinitions": null,
"GraphQLSchemas": null,
"AdminPath": null
}
12/17/2025 11:35:35 PM [Debug] : Server settings {
"Port": null,
"UseSSL": null,
"HostingScheme": null,
"UseHttp2": null,
"StartAdminInterface": null,
"ReadStaticMappings": null,
"WatchStaticMappings": null,
"WatchStaticMappingsInSubdirectories": null,
"ProxyAndRecordSettings": null,
"Urls": null,
"StartTimeout": 10000,
"AllowPartialMapping": null,
"AdminUsername": null,
"AdminPassword": null,
"AdminAzureADTenant": null,
"AdminAzureADAudience": null,
"RequestLogExpirationDuration": null,
"MaxRequestLogCount": null,
"CorsPolicyOptions": null,
"AllowCSharpCodeMatcher": null,
"AllowBodyForAllHttpMethods": null,
"AllowOnlyDefinedHttpStatusCodeInResponse": null,
"DisableJsonBodyParsing": null,
"DisableRequestBodyDecompressing": null,
"DisableDeserializeFormUrlEncoded": null,
"HandleRequestsSynchronously": null,
"CertificateSettings": null,
"CustomCertificateDefined": false,
"ClientCertificateMode": 0,
"AcceptAnyClientCertificate": false,
"WebhookSettings": null,
"UseRegexExtended": true,
"SaveUnmatchedRequests": null,
"DoNotSaveDynamicResponseInLogEntry": null,
"QueryParameterMultipleValueSupport": null,
"ProtoDefinitions": null,
"GraphQLSchemas": null,
"AdminPath": null
}
[MockServer Info] Server using .NET 8.0
12/17/2025 11:35:35 PM [Info] : Server using .NET 8.0
12/17/2025 11:47:34 PM [Info] : By Stef Heyenrath (https://github.com/WireMock-Net/WireMock.Net)
12/17/2025 11:47:34 PM [Debug] : Server settings {
"Port": null,
"UseSSL": null,
"HostingScheme": null,
"UseHttp2": null,
"StartAdminInterface": null,
"ReadStaticMappings": null,
"WatchStaticMappings": null,
"WatchStaticMappingsInSubdirectories": null,
"ProxyAndRecordSettings": null,
"Urls": null,
"StartTimeout": 10000,
"AllowPartialMapping": null,
"AdminUsername": null,
"AdminPassword": null,
"AdminAzureADTenant": null,
"AdminAzureADAudience": null,
"RequestLogExpirationDuration": null,
"MaxRequestLogCount": null,
"CorsPolicyOptions": null,
"AllowCSharpCodeMatcher": null,
"AllowBodyForAllHttpMethods": null,
"AllowOnlyDefinedHttpStatusCodeInResponse": null,
"DisableJsonBodyParsing": null,
"DisableRequestBodyDecompressing": null,
"DisableDeserializeFormUrlEncoded": null,
"HandleRequestsSynchronously": null,
"CertificateSettings": null,
"CustomCertificateDefined": false,
"ClientCertificateMode": 0,
"AcceptAnyClientCertificate": false,
"WebhookSettings": null,
"UseRegexExtended": true,
"SaveUnmatchedRequests": null,
"DoNotSaveDynamicResponseInLogEntry": null,
"QueryParameterMultipleValueSupport": null,
"ProtoDefinitions": null,
"GraphQLSchemas": null,
"AdminPath": null
}
12/17/2025 11:47:34 PM [Info] : Server using .NET 8.0
12/17/2025 11:49:30 PM [Info] : By Stef Heyenrath (https://github.com/WireMock-Net/WireMock.Net)
12/17/2025 11:49:30 PM [Debug] : Server settings {
"Port": null,
"UseSSL": null,
"HostingScheme": null,
"UseHttp2": null,
"StartAdminInterface": null,
"ReadStaticMappings": null,
"WatchStaticMappings": null,
"WatchStaticMappingsInSubdirectories": null,
"ProxyAndRecordSettings": null,
"Urls": null,
"StartTimeout": 10000,
"AllowPartialMapping": null,
"AdminUsername": null,
"AdminPassword": null,
"AdminAzureADTenant": null,
"AdminAzureADAudience": null,
"RequestLogExpirationDuration": null,
"MaxRequestLogCount": null,
"CorsPolicyOptions": null,
"AllowCSharpCodeMatcher": null,
"AllowBodyForAllHttpMethods": null,
"AllowOnlyDefinedHttpStatusCodeInResponse": null,
"DisableJsonBodyParsing": null,
"DisableRequestBodyDecompressing": null,
"DisableDeserializeFormUrlEncoded": null,
"HandleRequestsSynchronously": null,
"CertificateSettings": null,
"CustomCertificateDefined": false,
"ClientCertificateMode": 0,
"AcceptAnyClientCertificate": false,
"WebhookSettings": null,
"UseRegexExtended": true,
"SaveUnmatchedRequests": true,
"DoNotSaveDynamicResponseInLogEntry": null,
"QueryParameterMultipleValueSupport": null,
"ProtoDefinitions": null,
"GraphQLSchemas": null,
"AdminPath": null
}
12/17/2025 11:49:30 PM [Info] : Server using .NET 8.0
12/17/2025 11:51:44 PM [Info] : By Stef Heyenrath (https://github.com/WireMock-Net/WireMock.Net)
12/17/2025 11:51:44 PM [Debug] : Server settings {
"Port": null,
"UseSSL": null,
"HostingScheme": null,
"UseHttp2": null,
"StartAdminInterface": null,
"ReadStaticMappings": null,
"WatchStaticMappings": null,
"WatchStaticMappingsInSubdirectories": null,
"ProxyAndRecordSettings": null,
"Urls": null,
"StartTimeout": 10000,
"AllowPartialMapping": null,
"AdminUsername": null,
"AdminPassword": null,
"AdminAzureADTenant": null,
"AdminAzureADAudience": null,
"RequestLogExpirationDuration": 6,
"MaxRequestLogCount": 100,
"CorsPolicyOptions": null,
"AllowCSharpCodeMatcher": null,
"AllowBodyForAllHttpMethods": null,
"AllowOnlyDefinedHttpStatusCodeInResponse": null,
"DisableJsonBodyParsing": null,
"DisableRequestBodyDecompressing": null,
"DisableDeserializeFormUrlEncoded": null,
"HandleRequestsSynchronously": null,
"CertificateSettings": null,
"CustomCertificateDefined": false,
"ClientCertificateMode": 0,
"AcceptAnyClientCertificate": false,
"WebhookSettings": null,
"UseRegexExtended": true,
"SaveUnmatchedRequests": true,
"DoNotSaveDynamicResponseInLogEntry": null,
"QueryParameterMultipleValueSupport": null,
"ProtoDefinitions": null,
"GraphQLSchemas": null,
"AdminPath": null
}
12/17/2025 11:51:44 PM [Info] : Server using .NET 8.0
12/17/2025 11:57:21 PM [Info] : By Stef Heyenrath (https://github.com/wiremock/WireMock.Net)
12/17/2025 11:57:21 PM [Debug] : Server settings {
"Port": null,
"UseSSL": null,
"HostingScheme": null,
"UseHttp2": null,
"StartAdminInterface": null,
"ReadStaticMappings": null,
"WatchStaticMappings": null,
"WatchStaticMappingsInSubdirectories": null,
"ProxyAndRecordSettings": null,
"Urls": null,
"StartTimeout": 10000,
"AllowPartialMapping": null,
"AdminUsername": null,
"AdminPassword": null,
"AdminAzureADTenant": null,
"AdminAzureADAudience": null,
"RequestLogExpirationDuration": 6,
"MaxRequestLogCount": 100,
"CorsPolicyOptions": null,
"AllowCSharpCodeMatcher": null,
"AllowBodyForAllHttpMethods": null,
"AllowOnlyDefinedHttpStatusCodeInResponse": null,
"DisableJsonBodyParsing": null,
"DisableRequestBodyDecompressing": null,
"DisableDeserializeFormUrlEncoded": null,
"HandleRequestsSynchronously": null,
"CertificateSettings": null,
"CustomCertificateDefined": false,
"ClientCertificateMode": 0,
"AcceptAnyClientCertificate": false,
"WebhookSettings": null,
"UseRegexExtended": true,
"SaveUnmatchedRequests": true,
"DoNotSaveDynamicResponseInLogEntry": null,
"QueryParameterMultipleValueSupport": null,
"ProtoDefinitions": null,
"GraphQLSchemas": null,
"AdminPath": null,
"HandlebarsSettings": null
}
12/17/2025 11:57:21 PM [Info] : Server using .NET 8.0
This library is super useful, but it's been hard to debug because requests and responses are not being logged.
Ideally, we'd like to not log by default, but log when debugging is enabled somehow. This is our current setup:
BaseMockServerTest.cs:
GetAndReturnListOfObjectsTest.cs:
We use version 1.7.4 but 1.19.0 also doens't log. We do see the server configation logged:
Is there a way to turn on logging for requests/responses? Thank you in advance!