LoggerExtensions

This commit is contained in:
Timerix22 2022-11-18 02:43:14 +06:00
parent 80964f193f
commit 34922b7cc9

View File

@ -0,0 +1,12 @@
using Ben.Demystifier;
namespace DTLib.Logging.New;
public static class LoggerExtensions
{
public static void Log(this ILogger logger, string context, LogSeverity severity, object message)
=> logger.Log(context, severity, message, logger.Format);
public static void LogException(this ILogger logger, string context, Exception ex)
=> logger.Log(context, LogSeverity.Error, ex.Demystify());
}