Skip to content

Commit ee5eca4

Browse files
authored
Merge pull request #15 from serilog/dev
3.0.0 Release
2 parents 68cc513 + d21bcbc commit ee5eca4

File tree

8 files changed

+36
-40
lines changed

8 files changed

+36
-40
lines changed

Build.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if(Test-Path .\artifacts) {
1111

1212
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$env:APPVEYOR_REPO_BRANCH -ne $NULL];
1313
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
14-
$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "master" -and $revision -ne "local"]
14+
$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "main" -and $revision -ne "local"]
1515
$commitHash = $(git rev-parse --short HEAD)
1616
$buildSuffix = @{ $true = "$($suffix)-$($commitHash)"; $false = "$($branch)-$($commitHash)" }[$suffix -ne ""]
1717

@@ -23,7 +23,7 @@ foreach ($src in ls src/*) {
2323

2424
echo "build: Packaging project in $src"
2525

26-
& dotnet build -c Release --version-suffix=$buildSuffix
26+
& dotnet build -c Release --version-suffix=$buildSuffix -p:ContinuousIntegrationBuild=true
2727
if ($suffix) {
2828
& dotnet pack -c Release --include-source -o ..\..\artifacts --version-suffix=$suffix --no-build
2929
} else {

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Serilog.Sinks.Debug [![Build status](https://ci.appveyor.com/api/projects/status/oufg4e51868oq4eu?svg=true)](https://ci.appveyor.com/project/serilog/serilog-sinks-debug) [![NuGet Version](http://img.shields.io/nuget/v/Serilog.Sinks.Debug.svg?style=flat)](https://www.nuget.org/packages/Serilog.Sinks.Debug/) [![Documentation](https://img.shields.io/badge/docs-wiki-yellow.svg)](https://github.com/serilog/serilog/wiki) [![Join the chat at https://gitter.im/serilog/serilog](https://img.shields.io/gitter/room/serilog/serilog.svg)](https://gitter.im/serilog/serilog) [![Help](https://img.shields.io/badge/stackoverflow-serilog-orange.svg)](http://stackoverflow.com/questions/tagged/serilog)
1+
# Serilog.Sinks.Debug [![Build status](https://ci.appveyor.com/api/projects/status/oufg4e51868oq4eu?svg=true)](https://ci.appveyor.com/project/serilog/serilog-sinks-debug) [![NuGet Version](http://img.shields.io/nuget/v/Serilog.Sinks.Debug.svg?style=flat)](https://www.nuget.org/packages/Serilog.Sinks.Debug/) [![Help](https://img.shields.io/badge/stackoverflow-serilog-orange.svg)](http://stackoverflow.com/questions/tagged/serilog)
22

33
A Serilog sink that writes log events to the Visual Studio debug output window.
44

@@ -7,7 +7,7 @@ A Serilog sink that writes log events to the Visual Studio debug output window.
77
To use the sink, first install the [NuGet package](https://nuget.org/packages/serilog.sinks.debug):
88

99
```powershell
10-
Install-Package Serilog.Sinks.Debug
10+
dotnet add package Serilog.Sinks.Debug
1111
```
1212

1313
Then enable the sink using `WriteTo.Debug()`:

appveyor.yml

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
version: '{build}'
22
skip_tags: true
3-
image: Visual Studio 2019
3+
image: Visual Studio 2022
44
configuration: Release
55
test: off
66
build_script:
77
- ps: ./Build.ps1
88
artifacts:
99
- path: artifacts/Serilog.*.nupkg
10+
- path: artifacts/Serilog.*.snupkg
1011
deploy:
1112
- provider: NuGet
1213
api_key:
13-
secure: K3/810hkTO6rd2AEHVkUQAadjGmDREus9k96QHu6hxrA1/wRTuAJemHMKtVVgIvf
14+
secure: sDnchSg4TZIOK7oIUI6BJwFPNENTOZrGNsroGO1hehLJSvlHpFmpTwiX8+bgPD+Q
1415
skip_symbols: true
1516
on:
16-
branch: /^(master|dev)$/
17+
branch: /^(main|dev)$/
1718
- provider: GitHub
1819
auth_token:
1920
secure: p4LpVhBKxGS5WqucHxFQ5c7C8cP74kbNB0Z8k9Oxx/PMaDQ1+ibmoexNqVU5ZlmX
20-
artifact: /Serilog.*\.nupkg/
21+
artifacts:
22+
/Serilog.*\.nupkg/
23+
/Serilog.*\.snupkg/
2124
tag: v$(appveyor_build_version)
2225
on:
23-
branch: master
26+
branch: main

global.json

-5
This file was deleted.

sample/DebugDemo/DebugDemo.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net5.0</TargetFrameworks>
5+
<TargetFrameworks>net8.0</TargetFrameworks>
66
</PropertyGroup>
77

88
<ItemGroup>

src/Serilog.Sinks.Debug/Serilog.Sinks.Debug.csproj

+14-15
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22

33
<PropertyGroup>
44
<Description>A Serilog sink that writes log events to the debug output window.</Description>
5-
<VersionPrefix>2.0.0</VersionPrefix>
5+
<VersionPrefix>3.0.0</VersionPrefix>
66
<Authors>Serilog Contributors</Authors>
7-
<TargetFrameworks>net45;net46;netstandard1.0;netstandard2.0;netstandard2.1</TargetFrameworks>
7+
<!-- .NET Framework version targeting is frozen at these two TFMs. -->
8+
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT'">net471;net462</TargetFrameworks>
9+
<!-- Policy is to trim TFM-specific builds to `netstandard2.0`, `net6.0`,
10+
all active LTS versions, and optionally the latest RTM version, when releasing new
11+
major Serilog versions. -->
12+
<TargetFrameworks>$(TargetFrameworks);net8.0;net6.0;netstandard2.0</TargetFrameworks>
813
<AssemblyName>Serilog.Sinks.Debug</AssemblyName>
914
<AssemblyOriginatorKeyFile>../../assets/Serilog.snk</AssemblyOriginatorKeyFile>
1015
<SignAssembly>true</SignAssembly>
@@ -14,11 +19,12 @@
1419
<PackageProjectUrl>https://github.com/serilog/serilog-sinks-debug</PackageProjectUrl>
1520
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
1621
<PackageIcon>icon.png</PackageIcon>
17-
<RepositoryUrl>https://github.com/serilog/serilog-sinks-debug</RepositoryUrl>
18-
<RepositoryType>git</RepositoryType>
22+
<PackageReadmeFile>README.md</PackageReadmeFile>
23+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
24+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
25+
<IncludeSymbols>true</IncludeSymbols>
26+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
1927
<GenerateDocumentationFile>true</GenerateDocumentationFile>
20-
<!-- Don't reference the full NETStandard.Library -->
21-
<DisableImplicitFrameworkReferences Condition=" '$(TargetFramework)' == 'netstandard1.0' ">true</DisableImplicitFrameworkReferences>
2228
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
2329
<RootNamespace>Serilog</RootNamespace>
2430
</PropertyGroup>
@@ -29,19 +35,12 @@
2935
</PropertyGroup>
3036

3137
<ItemGroup>
32-
<PackageReference Include="Serilog" Version="2.10.0" />
38+
<PackageReference Include="Serilog" Version="4.0.0" />
3339
</ItemGroup>
3440

35-
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.0' ">
36-
<PackageReference Include="System.Diagnostics.Debug" Version="4.3.0" />
37-
</ItemGroup>
38-
39-
<PropertyGroup Condition=" '$(TargetFramework)' != 'netstandard1.0' ">
40-
<DefineConstants>$(DefineConstants);DEBUG_WRITE</DefineConstants>
41-
</PropertyGroup>
42-
4341
<ItemGroup>
4442
<None Include="..\..\assets\icon.png" Pack="true" Visible="false" PackagePath="" />
43+
<None Include="../../README.md" Pack="true" Visible="false" PackagePath="/" />
4544
</ItemGroup>
4645

4746
</Project>

src/Serilog.Sinks.Debug/Sinks/Debug/DebugSink.cs

+1-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
namespace Serilog.Sinks.Debug
2222
{
23-
class DebugSink : ILogEventSink
23+
sealed class DebugSink : ILogEventSink
2424
{
2525
readonly ITextFormatter _formatter;
2626

@@ -34,11 +34,7 @@ public void Emit(LogEvent logEvent)
3434
using (var buffer = new StringWriter())
3535
{
3636
_formatter.Format(logEvent, buffer);
37-
#if DEBUG_WRITE
3837
System.Diagnostics.Debug.Write(buffer.ToString());
39-
#else
40-
System.Diagnostics.Debug.WriteLine(buffer.ToString().Trim());
41-
#endif
4238
}
4339
}
4440
}

test/Serilog.Sinks.Debug.Tests/Serilog.Sinks.Debug.Tests.csproj

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net5.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net48</TargetFrameworks>
55
<AssemblyOriginatorKeyFile>../../assets/Serilog.snk</AssemblyOriginatorKeyFile>
66
<SignAssembly>true</SignAssembly>
77
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
8+
<IsPackable>false</IsPackable>
89
</PropertyGroup>
910

1011
<ItemGroup>
1112
<ProjectReference Include="..\..\src\Serilog.Sinks.Debug\Serilog.Sinks.Debug.csproj" />
1213
</ItemGroup>
1314

1415
<ItemGroup>
15-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
16-
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
17-
<PackageReference Include="xunit" Version="2.2.0" />
18-
<PackageReference Include="System.ValueTuple" Version="4.3.1" />
16+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
17+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
18+
<PrivateAssets>all</PrivateAssets>
19+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
20+
</PackageReference>
21+
<PackageReference Include="xunit" Version="2.8.1" />
1922
</ItemGroup>
2023

2124
<ItemGroup>

0 commit comments

Comments
 (0)