Skip to content
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

Use try..catch to set encoding in WireMockConsoleLogger #1104

Merged
merged 1 commit into from
May 17, 2024

Conversation

asherber
Copy link
Contributor

In Linqpad, the "console" is just a facade over web browser output, so calling Console.OutputEncoding = System.Text.Encoding.UTF8 in the constructor for WireMockConsoleLogger throws an exception.

This PR adds a try..catch block to that code, so that the logger can be used in Linqpad (and any other non-standard consoles).

@StefH StefH added the feature label May 17, 2024
@StefH StefH merged commit 0b278db into WireMock-Net:master May 17, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants