Skip to content

Commit

Permalink
Use try..catch to set encoding in WireMockConsoleLogger (#1104)
Browse files Browse the repository at this point in the history
  • Loading branch information
asherber authored May 17, 2024
1 parent add3f66 commit 0b278db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/WireMock.Net/Logging/WireMockConsoleLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ public class WireMockConsoleLogger : IWireMockLogger
/// </summary>
public WireMockConsoleLogger()
{
Console.OutputEncoding = System.Text.Encoding.UTF8;
try
{
Console.OutputEncoding = System.Text.Encoding.UTF8;
}
catch { }
}

/// <see cref="IWireMockLogger.Debug"/>
Expand Down

0 comments on commit 0b278db

Please sign in to comment.