取消异常相关

This commit is contained in:
龙腾猫跃 committed 2026-06-23 08:33:17 +08:00
1 parent 20ed81ed9e
commit d66af3d6cd
3 files changed
+22 -4

No files matched your search

+2 -2
View File
@@ -184,8 +184,8 @@ public class BaseLogger {
// 核心方法
public virtual void Log(Exception? ex, string? message, LogLevel level, LogBehavior behavior, string filePath) {
if (ex is ThreadInterruptedException) {
Thread.CurrentThread.Interrupt();
if (ex?.IsCanceled() == true) {
Log(null, $"操作已取消({message})", LogLevel.Info, LogBehavior.None, filePath);
return;
}
if (MinLevel > level) return;