Log Exception (#405)

This commit is contained in:
Stef Heyenrath
2020-01-25 15:25:47 +01:00
committed by GitHub
parent bd0c5a83c9
commit 69bbd76ca4
7 changed files with 52 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
using log4net;
using System;
using log4net;
using Newtonsoft.Json;
using WireMock.Logging;
using WireMock.Models.Requests;
namespace WireMock.Net.StandAlone.NETCoreApp
{
@@ -29,6 +29,11 @@ namespace WireMock.Net.StandAlone.NETCoreApp
Log.ErrorFormat(formatString, args);
}
public void Error(string message, Exception exception)
{
Log.Error(message, exception);
}
public void DebugRequestResponse(LogEntryModel logEntryModel, bool isAdminRequest)
{
string message = JsonConvert.SerializeObject(logEntryModel, Formatting.Indented);