From d1389396dc79bf4b7d0bb999fbf55d6be510e8f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E8=85=BE=E7=8C=AB=E8=B7=83?= <1043137532@qq.com> Date: Thu, 18 Jun 2026 22:11:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=A6=BB=20Logger=20=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Shared/Main.cs | 3 +-- Tests/TestUtils.cs | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Shared/Main.cs b/Shared/Main.cs index 4286d55..f0e8e7d 100644 --- a/Shared/Main.cs +++ b/Shared/Main.cs @@ -2,10 +2,9 @@ public static class Main { public static string AppName = "Meloong"; - public static void Init(string appName, BaseLogger? logger = null) { + public static void Init(string appName) { AppName = appName; AppDomain.CurrentDomain.SetData("REGEX_DEFAULT_MATCH_TIMEOUT", TimeSpan.FromSeconds(5)); - if (logger != null) Logger.Instance = logger; } } diff --git a/Tests/TestUtils.cs b/Tests/TestUtils.cs index 833e1d8..3d312fb 100644 --- a/Tests/TestUtils.cs +++ b/Tests/TestUtils.cs @@ -7,7 +7,8 @@ public abstract class TestBase { public TestBase() { - MeloongCore.Main.Init("MeloongCoreTest", new TestLogger()); + MeloongCore.Main.Init("MeloongCoreTest"); + Logger.Instance = new TestLogger(); } private class TestLogger : BaseLogger { public override void HandleBehavior(string? rawMessage, string formattedMessage, LogBehavior behavior, Exception? ex)