We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47fc252 commit f0fcb7fCopy full SHA for f0fcb7f
1 file changed
src/extensions/BootstrapBlazor.Socket/Logging/SocketLogging.cs
@@ -30,15 +30,17 @@ public static void Init(ILogger logger)
30
}
31
32
/// <summary>
33
- ///
34
- /// </summary>
35
- /// <param name="message"></param>
36
- public static void LogError(string message) => _logger?.LogError(message);
37
-
38
- /// <summary>
39
+ /// 记录异常信息方法
40
/// </summary>
41
/// <param name="ex"></param>
42
/// <param name="message"></param>
43
- public static void LogError(Exception ex, string? message) => _logger?.LogError(ex, message);
+ public static void LogError(Exception ex, string? message = null)
+ {
+ if (_logger == null)
+ return;
+ }
+
44
+ _logger.LogError(ex, "{message}", message);
45
46
0 commit comments