1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-20 12:53:02 +00:00

Added StaticLogger to LibraryHelpers, updated warning logging for converters to use StaticLogger

This commit is contained in:
Jkorf
2025-10-30 12:52:05 +01:00
parent 7413d03d31
commit dbc430e838
6 changed files with 40 additions and 24 deletions
@@ -1,4 +1,5 @@
using System;
using Microsoft.Extensions.Logging;
using System;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Text.Json;
@@ -47,7 +48,7 @@ namespace CryptoExchange.Net.Converters.SystemTextJson
if (string.IsNullOrEmpty(value))
{
if (typeToConvert == typeof(bool))
Trace.WriteLine($"{DateTime.Now:yyyy/MM/dd HH:mm:ss:fff} | Warning | Received null bool value, but property type is not a nullable bool");
LibraryHelpers.StaticLogger?.LogWarning("Received null bool value, but property type is not a nullable bool");
return default;
}