This commit is contained in:
timerix 2022-12-06 01:35:09 +06:00
parent b66b93947d
commit 3f6579ec27

View File

@ -15,6 +15,9 @@ public static class LoggerExtensions
public static void LogWarn(this ILogger logger, string context, object message)
=> logger.Log(context, LogSeverity.Warn, message);
public static void LogError(this ILogger logger, string context, object message)
=> logger.Log(context, LogSeverity.Error, message);
/// uses Ben.Demystifier to serialize exception
public static void LogException(this ILogger logger, string context, Exception ex)
=> logger.Log(context, LogSeverity.Error, ex.Demystify());