LogError
This commit is contained in:
parent
b66b93947d
commit
3f6579ec27
@ -15,6 +15,9 @@ public static class LoggerExtensions
|
|||||||
public static void LogWarn(this ILogger logger, string context, object message)
|
public static void LogWarn(this ILogger logger, string context, object message)
|
||||||
=> logger.Log(context, LogSeverity.Warn, 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
|
/// uses Ben.Demystifier to serialize exception
|
||||||
public static void LogException(this ILogger logger, string context, Exception ex)
|
public static void LogException(this ILogger logger, string context, Exception ex)
|
||||||
=> logger.Log(context, LogSeverity.Error, ex.Demystify());
|
=> logger.Log(context, LogSeverity.Error, ex.Demystify());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user