From 6475d2c4218639a4cd200ef2993c19e0e680bc47 Mon Sep 17 00:00:00 2001 From: GwWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Fri, 2 Jan 2026 09:58:43 +0800 Subject: [PATCH] =?UTF-8?q?fix(logging):=20=E8=B0=83=E6=95=B4=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E7=BA=A7=E5=88=AB=E8=BE=93=E5=87=BA=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 Fatal 级别日志从 PrintErr 改为 PushError - 重新排列 switch 语句中的 case 顺序 - 确保 Fatal 和 Error 级别使用正确的 Godot 日志方法 --- GFramework.Godot/logging/GodotLogger.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GFramework.Godot/logging/GodotLogger.cs b/GFramework.Godot/logging/GodotLogger.cs index 4c73eb5..3669844 100644 --- a/GFramework.Godot/logging/GodotLogger.cs +++ b/GFramework.Godot/logging/GodotLogger.cs @@ -21,11 +21,13 @@ public sealed class GodotLogger( // 根据日志级别选择不同的输出方法 switch (level) { - case LogLevel.Error: case LogLevel.Fatal: - GD.PrintErr($"{prefix} {message}"); + GD.PushError($"{prefix} {message}"); break; + case LogLevel.Error: + GD.PrintErr($"{prefix} {message}"); + break; case LogLevel.Warning: GD.PushWarning($"{prefix} {message}"); break;