Update LoggerClient.cs

This commit is contained in:
Mira 2023-08-23 04:26:20 +02:00
parent f1a061edc1
commit a2ed87f7ce
Signed by untrusted user who does not match committer: Xorog
GPG key ID: 983798ED9C3E7C36

View file

@ -231,7 +231,12 @@ public sealed class LoggerClient : ILogger
if (currentLog.Exception is not null)
try
{
Console.WriteLine(JsonConvert.SerializeObject(currentLog.Exception, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }));
Console.WriteLine(JsonConvert.SerializeObject(currentLog.Exception, Formatting.Indented, new JsonSerializerSettings()
{
NullValueHandling = NullValueHandling.Ignore,
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
Error = (serializer, err) => err.ErrorContext.Handled = true
}));
}
catch (Exception)
{