Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/WireMock.Net.WebApplication.NET6/WireMockService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public void DebugRequestResponse(LogEntryModel logEntryModel, bool isAdminreques
_logger.LogDebug("Admin[{0}] {1}", isAdminrequest, message);
}

public void Error(string formatString, Exception exception)
public void Error(string message, Exception exception)
{
_logger.LogError(formatString, exception.Message);
_logger.LogError(exception, message);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/WireMock.Net.TUnit/TUnitWireMockLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public void Error(string formatString, params object[] args)
}

/// <inheritdoc />
public void Error(string formatString, Exception exception)
public void Error(string message, Exception exception)
{
_tUnitLogger.LogError(Format("Error", formatString, exception.Message), exception);
_tUnitLogger.LogError(Format("Error", $"{message} {{0}}", exception));

if (exception is AggregateException ae)
{
Expand Down
6 changes: 3 additions & 3 deletions src/WireMock.Net.xUnit/TestOutputHelperWireMockLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ public void Error(string formatString, params object[] args)
}

/// <inheritdoc />
public void Error(string formatString, Exception exception)
public void Error(string message, Exception exception)
{
_testOutputHelper.WriteLine(Format("Error", formatString, exception.Message));
_testOutputHelper.WriteLine(Format("Error", $"{message} {{0}}", exception));

if (exception is AggregateException ae)
{
ae.Handle(ex =>
{
_testOutputHelper.WriteLine(Format("Error", "Exception {0}", ex.Message));
_testOutputHelper.WriteLine(Format("Error", "Exception {0}", ex));
return true;
});
}
Expand Down