From 0df32ccd44d3a5a97eb766f66b658d87438496e8 Mon Sep 17 00:00:00 2001 From: NextTurn <45985406+nxtn@users.noreply.github.com> Date: Mon, 6 Apr 2020 00:00:00 +0800 Subject: [PATCH] Bump log4net to 2.0.12 --- src/WinSW.Core/Native/Throw.cs | 1 + src/WinSW.Core/WinSW.Core.csproj | 13 +------------ src/WinSW/Program.cs | 20 +++----------------- src/WinSW/WinSW.csproj | 4 ---- src/WinSW/WrapperService.cs | 6 +----- 5 files changed, 6 insertions(+), 38 deletions(-) diff --git a/src/WinSW.Core/Native/Throw.cs b/src/WinSW.Core/Native/Throw.cs index fa137d7..1eab5d2 100644 --- a/src/WinSW.Core/Native/Throw.cs +++ b/src/WinSW.Core/Native/Throw.cs @@ -67,6 +67,7 @@ namespace WinSW.Native } /// + [DoesNotReturn] [MethodImpl(MethodImplOptions.NoInlining)] internal static void Win32Exception(string message) { diff --git a/src/WinSW.Core/WinSW.Core.csproj b/src/WinSW.Core/WinSW.Core.csproj index 2395209..2ebd139 100644 --- a/src/WinSW.Core/WinSW.Core.csproj +++ b/src/WinSW.Core/WinSW.Core.csproj @@ -8,7 +8,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -17,19 +17,8 @@ - - - - - - - - - - - diff --git a/src/WinSW/Program.cs b/src/WinSW/Program.cs index 4f63c96..d2eb6c9 100644 --- a/src/WinSW/Program.cs +++ b/src/WinSW/Program.cs @@ -1177,9 +1177,7 @@ namespace WinSW var consoleLogLevel = Level.Info; var eventLogLevel = Level.Warn; -#if NET var repository = LogManager.GetRepository(Assembly.GetExecutingAssembly()); -#endif if (inConsoleMode) { @@ -1191,11 +1189,7 @@ namespace WinSW }; consoleAppender.ActivateOptions(); - BasicConfigurator.Configure( -#if NET - repository, -#endif - consoleAppender); + BasicConfigurator.Configure(repository, consoleAppender); } else { @@ -1206,11 +1200,7 @@ namespace WinSW }; eventLogAppender.ActivateOptions(); - BasicConfigurator.Configure( -#if NET - repository, -#endif - eventLogAppender); + BasicConfigurator.Configure(repository, eventLogAppender); } XmlServiceConfig config; @@ -1243,11 +1233,7 @@ namespace WinSW }; fileAppender.ActivateOptions(); - BasicConfigurator.Configure( -#if NET - repository, -#endif - fileAppender); + BasicConfigurator.Configure(repository, fileAppender); return config; } diff --git a/src/WinSW/WinSW.csproj b/src/WinSW/WinSW.csproj index a8d6188..422b070 100644 --- a/src/WinSW/WinSW.csproj +++ b/src/WinSW/WinSW.csproj @@ -28,10 +28,6 @@ - - - - diff --git a/src/WinSW/WrapperService.cs b/src/WinSW/WrapperService.cs index eeb6757..6b81abe 100644 --- a/src/WinSW/WrapperService.cs +++ b/src/WinSW/WrapperService.cs @@ -21,11 +21,7 @@ namespace WinSW private static readonly int additionalStopTimeout = 1_000; - private static readonly ILog Log = LogManager.GetLogger( -#if NET - Assembly.GetExecutingAssembly(), -#endif - "WinSW"); + private static readonly ILog Log = LogManager.GetLogger(typeof(WrapperService)); private readonly XmlServiceConfig config;