From b8d30dd21c6a3fb0d8293693bf1bef80762d0b8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E5=9B=BD=E4=BC=9F?= <366193849@qq.com>
Date: Tue, 18 Jan 2022 13:54:44 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E5=BF=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
FastGithub.Configuration/LoggerExtensions.cs | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/FastGithub.Configuration/LoggerExtensions.cs b/FastGithub.Configuration/LoggerExtensions.cs
index 5d5ba95..f920cc8 100644
--- a/FastGithub.Configuration/LoggerExtensions.cs
+++ b/FastGithub.Configuration/LoggerExtensions.cs
@@ -17,6 +17,16 @@ namespace FastGithub
public static void Log(this ILogger logger, LogLevel level, FormattableString formattableString)
=> logger.Log(level, formattableString.Format, formattableString.GetArguments());
+ ///
+ /// 输出日志
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static void Log(this ILogger logger, LogLevel level, Exception? error, FormattableString formattableString)
+ => logger.Log(level, error, formattableString.Format, formattableString.GetArguments());
+
///
/// 输出Trace日志
///
@@ -57,6 +67,14 @@ namespace FastGithub
public static void LogError(this ILogger logger, FormattableString formattableString)
=> logger.Log(LogLevel.Error, formattableString);
+ ///
+ /// 输出日志
+ ///
+ ///
+ ///
+ public static void LogError(this ILogger logger, Exception error, FormattableString formattableString)
+ => logger.Log(LogLevel.Error, error, formattableString);
+
///
/// 输出Critical日志
///