diff --git a/Build.ps1 b/Build.ps1 index ee4117d..4c96282 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -23,7 +23,7 @@ foreach ($src in ls src/*) { echo "build: Packaging project in $src" - & dotnet build -c Release --version-suffix=$buildSuffix + & dotnet build -c Release --version-suffix=$buildSuffix -p:ContinuousIntegrationBuild=true if ($suffix) { & dotnet pack -c Release --include-source -o ..\..\artifacts --version-suffix=$suffix --no-build } else { diff --git a/appveyor.yml b/appveyor.yml index 6381f73..4a8f460 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,6 +7,7 @@ build_script: - ps: ./Build.ps1 artifacts: - path: artifacts/Serilog.*.nupkg +- path: artifacts/Serilog.*.snupkg deploy: - provider: NuGet api_key: @@ -17,7 +18,9 @@ deploy: - provider: GitHub auth_token: secure: p4LpVhBKxGS5WqucHxFQ5c7C8cP74kbNB0Z8k9Oxx/PMaDQ1+ibmoexNqVU5ZlmX - artifact: /Serilog.*\.nupkg/ + artifacts: + /Serilog.*\.nupkg/ + /Serilog.*\.snupkg/ tag: v$(appveyor_build_version) on: branch: master diff --git a/global.json b/global.json deleted file mode 100644 index 2cb2ac9..0000000 --- a/global.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "sdk": { - "version": "5.0.100" - } -} \ No newline at end of file diff --git a/sample/DebugDemo/DebugDemo.csproj b/sample/DebugDemo/DebugDemo.csproj index b46bffa..24278ce 100644 --- a/sample/DebugDemo/DebugDemo.csproj +++ b/sample/DebugDemo/DebugDemo.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net8.0 diff --git a/src/Serilog.Sinks.Debug/Serilog.Sinks.Debug.csproj b/src/Serilog.Sinks.Debug/Serilog.Sinks.Debug.csproj index 4c13b5a..ce087af 100644 --- a/src/Serilog.Sinks.Debug/Serilog.Sinks.Debug.csproj +++ b/src/Serilog.Sinks.Debug/Serilog.Sinks.Debug.csproj @@ -2,9 +2,14 @@ A Serilog sink that writes log events to the debug output window. - 2.0.1 + 3.0.0 Serilog Contributors - net45;net46;netstandard1.0;netstandard2.0;netstandard2.1 + + net471;net462 + + $(TargetFrameworks);net8.0;net6.0;netstandard2.0 Serilog.Sinks.Debug ../../assets/Serilog.snk true @@ -14,11 +19,12 @@ https://github.com/serilog/serilog-sinks-debug Apache-2.0 icon.png - https://github.com/serilog/serilog-sinks-debug - git + README.md + true + true + true + snupkg true - - true True Serilog @@ -29,19 +35,12 @@ - + - - - - - - $(DefineConstants);DEBUG_WRITE - - + diff --git a/src/Serilog.Sinks.Debug/Sinks/Debug/DebugSink.cs b/src/Serilog.Sinks.Debug/Sinks/Debug/DebugSink.cs index 3946eca..6c3e5cd 100644 --- a/src/Serilog.Sinks.Debug/Sinks/Debug/DebugSink.cs +++ b/src/Serilog.Sinks.Debug/Sinks/Debug/DebugSink.cs @@ -20,7 +20,7 @@ namespace Serilog.Sinks.Debug { - class DebugSink : ILogEventSink + sealed class DebugSink : ILogEventSink { readonly ITextFormatter _formatter; @@ -34,11 +34,7 @@ public void Emit(LogEvent logEvent) using (var buffer = new StringWriter()) { _formatter.Format(logEvent, buffer); -#if DEBUG_WRITE System.Diagnostics.Debug.Write(buffer.ToString()); -#else - System.Diagnostics.Debug.WriteLine(buffer.ToString().Trim()); -#endif } } } diff --git a/test/Serilog.Sinks.Debug.Tests/Serilog.Sinks.Debug.Tests.csproj b/test/Serilog.Sinks.Debug.Tests/Serilog.Sinks.Debug.Tests.csproj index caa2ba5..6e8c908 100644 --- a/test/Serilog.Sinks.Debug.Tests/Serilog.Sinks.Debug.Tests.csproj +++ b/test/Serilog.Sinks.Debug.Tests/Serilog.Sinks.Debug.Tests.csproj @@ -1,10 +1,11 @@  - net5.0 + net8.0;net48 ../../assets/Serilog.snk true true + false @@ -12,10 +13,12 @@ - - - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + +