From fb74fe3107545672cfb2e7860463322e74d6f989 Mon Sep 17 00:00:00 2001 From: lhiven Date: Wed, 27 Nov 2024 09:56:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=AE=B0=E5=BD=95=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0M1Debug=E5=92=8CM2Debug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.Framework/LogHelper.cs | 22 ++++++++++++++++++++++ Rs.Framework/log4net.config | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/Rs.Framework/LogHelper.cs b/Rs.Framework/LogHelper.cs index 3f939d7..b5b1bcc 100644 --- a/Rs.Framework/LogHelper.cs +++ b/Rs.Framework/LogHelper.cs @@ -14,6 +14,8 @@ namespace Rs.Framework private static readonly ILog logingo = LogManager.GetLogger("Info"); private static readonly ILog logwarning = LogManager.GetLogger("Warning"); private static readonly ILog logmove = LogManager.GetLogger("Move"); + private static readonly ILog logM1Debug = LogManager.GetLogger("M1Debug"); + private static readonly ILog logM2Debug = LogManager.GetLogger("M2Debug"); public static void Error(string content) { logerror.Error(content);} @@ -69,5 +71,25 @@ namespace Rs.Framework logmove.Info(content, ex); } } + + public static void DebugM1(string content) { logM1Debug.Info(content); } + + public static void DebugM1(string content, Exception ex) + { + if (logM1Debug.IsInfoEnabled) + { + logM1Debug.Info(content, ex); + } + } + + public static void DebugM2(string content) { logM2Debug.Info(content); } + + public static void DebugM2(string content, Exception ex) + { + if (logM2Debug.IsInfoEnabled) + { + logM2Debug.Info(content, ex); + } + } } } diff --git a/Rs.Framework/log4net.config b/Rs.Framework/log4net.config index b805224..9ff3567 100644 --- a/Rs.Framework/log4net.config +++ b/Rs.Framework/log4net.config @@ -26,6 +26,12 @@ + + + + + + @@ -116,5 +122,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file