-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable debug logging in WireMock dotnet tool #844
Comments
@wolf8196 Please try preview version: (https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions) |
The reason I've created an own simple logging class in WireMock, is that I cannot use Microsoft.Extensions.Logging.Abstractions because I'm still supporting older frameworks like 4.5.2 & 4.6 I need to think on this.... |
@StefH |
Hi.
Is there a way to set log level in WireMock dotnet tool to disable debug messages?
Or disable logging entirely?
It's useful to see request/response when you are setting everything up, but once that's done, those logs are just spam.
From what I understand the logger currently is created in Program.cs with debug level & passed into StandAloneApp logic.
WireMock.Net/src/dotnet-WireMock.Net/Program.cs
Line 23 in 49b29d7
And here
WireMock.Net/src/WireMock.Net/Settings/WireMockServerSettingsParser.cs
Line 65 in 49b29d7
The "logger is not null" check will always be true & just reassign the logger, without possibility to override it with console arguments.
And also there is only check for WireMockConsoleLogger, and no way to use the WireMockNullLogger, that probably disables the logging.
Please let me know if I missed something, or of any other way to get rid of request/response logging.
Thank you
The text was updated successfully, but these errors were encountered: