From 94f939d6f405e84329881f6ff4825bc77d0227ad Mon Sep 17 00:00:00 2001 From: niushuai233 Date: Sun, 18 Sep 2022 17:05:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.config | 35 ++++++++----------------------- Properties/AssemblyInfo.cs | 2 ++ RepositorySync.csproj | 6 ++++++ Util/LogUtil.cs | 2 +- log4net.config | 42 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 60 insertions(+), 27 deletions(-) create mode 100644 log4net.config diff --git a/App.config b/App.config index c2c2b0c..54802eb 100644 --- a/App.config +++ b/App.config @@ -1,31 +1,14 @@  - + - - - - - - - - - - - -
- - - - - - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index d75974f..c46d270 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -34,3 +34,5 @@ using System.Runtime.InteropServices; // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)] \ No newline at end of file diff --git a/RepositorySync.csproj b/RepositorySync.csproj index 7822e26..79e61eb 100644 --- a/RepositorySync.csproj +++ b/RepositorySync.csproj @@ -228,6 +228,7 @@ + MainForm.cs @@ -254,6 +255,11 @@ + + + Always + + diff --git a/Util/LogUtil.cs b/Util/LogUtil.cs index 13c6f62..5a26052 100644 --- a/Util/LogUtil.cs +++ b/Util/LogUtil.cs @@ -8,7 +8,7 @@ namespace Util /// /// 默认log实例 /// - private static ILog LOG = LogManager.GetLogger("Console"); + private static ILog LOG = LogManager.GetLogger("ALL"); /// /// 默认控制台logger debug diff --git a/log4net.config b/log4net.config new file mode 100644 index 0000000..2ee8952 --- /dev/null +++ b/log4net.config @@ -0,0 +1,42 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file