Skip to content

Commit da21b99

Browse files
authored
Merge pull request #5 from serilog/dev
2.0.2 Release
2 parents 7832268 + cb15c4e commit da21b99

File tree

14 files changed

+116
-146
lines changed

14 files changed

+116
-146
lines changed

.editorconfig

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
root=true
1+
root = true
22

33
[*]
4+
trim_trailing_whitespace = true
5+
insert_final_newline = true
46
indent_style = space
57
indent_size = 4
8+
9+
[*.{csproj,json,config,yml}]
10+
indent_size = 2

Build.ps1

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,47 @@ if(Test-Path .\artifacts) {
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];
1414
$suffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)))-$revision"}[$branch -eq "master" -and $revision -ne "local"]
15+
$commitHash = $(git rev-parse --short HEAD)
16+
$buildSuffix = @{ $true = "$($suffix)-$($commitHash)"; $false = "$($branch)-$($commitHash)" }[$suffix -ne ""]
1517

16-
echo "build: Version suffix is $suffix"
18+
echo "build: Package version suffix is $suffix"
19+
echo "build: Build version suffix is $buildSuffix"
1720

1821
foreach ($src in ls src/*) {
1922
Push-Location $src
2023

2124
echo "build: Packaging project in $src"
2225

23-
& dotnet pack -c Release -o ..\..\artifacts --version-suffix=$suffix
26+
& dotnet build -c Release --version-suffix=$buildSuffix
27+
28+
if($suffix) {
29+
& dotnet pack -c Release --include-source --no-build -o ..\..\artifacts --version-suffix=$suffix
30+
} else {
31+
& dotnet pack -c Release --include-source --no-build -o ..\..\artifacts
32+
}
2433
if($LASTEXITCODE -ne 0) { exit 1 }
2534

2635
Pop-Location
2736
}
2837

29-
foreach ($test in ls test/*.PerformanceTests) {
38+
foreach ($test in ls test/*.Tests) {
3039
Push-Location $test
3140

32-
echo "build: Building performance test project in $test"
41+
echo "build: Testing project in $test"
3342

34-
& dotnet build -c Release
35-
if($LASTEXITCODE -ne 0) { exit 2 }
43+
& dotnet test -c Release
44+
if($LASTEXITCODE -ne 0) { exit 3 }
3645

3746
Pop-Location
3847
}
3948

40-
foreach ($test in ls test/*.Tests) {
49+
foreach ($test in ls test/*.PerformanceTests) {
4150
Push-Location $test
4251

43-
echo "build: Testing project in $test"
52+
echo "build: Building performance test project in $test"
4453

45-
& dotnet test -c Release
46-
if($LASTEXITCODE -ne 0) { exit 3 }
54+
& dotnet build -c Release
55+
if($LASTEXITCODE -ne 0) { exit 2 }
4756

4857
Pop-Location
4958
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Log.Logger = new LoggerConfiguration()
2121
.Subscribe())
2222
.CreateLogger();
2323

24-
Log.Infomation("Hello, observers!");
24+
Log.Information("Hello, observers!");
2525

2626
Log.CloseAndFlush();
2727
```

appveyor.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
version: '{build}'
22
skip_tags: true
3-
image: Visual Studio 2015
3+
image: Visual Studio 2017
44
configuration: Release
5-
install:
6-
- ps: mkdir -Force ".\build\" | Out-Null
7-
- ps: Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.ps1" -OutFile ".\build\installcli.ps1"
8-
- ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetcli"
9-
- ps: '& .\build\installcli.ps1 -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath -Version 1.0.0-preview2-003121'
10-
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
5+
test: off
116
build_script:
127
- ps: ./Build.ps1
13-
test: off
148
artifacts:
159
- path: artifacts/Serilog.*.nupkg
1610
deploy:

global.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

serilog-sinks-observable.sln

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,51 @@
1-
21
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
2+
# Visual Studio 15
3+
VisualStudioVersion = 15.0.27004.2002
54
MinimumVisualStudioVersion = 10.0.40219.1
65
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{037440DE-440B-4129-9F7A-09B42D00397E}"
76
EndProject
87
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "assets", "assets", "{E9D1B5E1-DEB9-4A04-8BAB-24EC7240ADAF}"
98
ProjectSection(SolutionItems) = preProject
9+
.editorconfig = .editorconfig
10+
.gitattributes = .gitattributes
11+
.gitignore = .gitignore
1012
appveyor.yml = appveyor.yml
1113
Build.ps1 = Build.ps1
1214
CHANGES.md = CHANGES.md
13-
global.json = global.json
14-
NuGet.Config = NuGet.Config
15+
LICENSE = LICENSE
1516
README.md = README.md
1617
assets\Serilog.snk = assets\Serilog.snk
1718
EndProjectSection
1819
EndProject
19-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Sinks.Observable", "src\Serilog.Sinks.Observable\Serilog.Sinks.Observable.xproj", "{8D6C0BB9-D04D-49B6-9043-4A776AD275D5}"
20-
EndProject
2120
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{9D8490A7-A075-4E53-A5F2-A960CF4DB3E7}"
2221
EndProject
23-
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Serilog.Tests", "test\Serilog.Tests\Serilog.Tests.xproj", "{3C2D8E01-5580-426A-BDD9-EC59CD98E618}"
22+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Sinks.Observable", "src\Serilog.Sinks.Observable\Serilog.Sinks.Observable.csproj", "{727C1498-20A8-4C1A-BE5F-8AB762F920DC}"
23+
EndProject
24+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Serilog.Tests", "test\Serilog.Tests\Serilog.Tests.csproj", "{C88A987D-3E79-481C-9DD7-441371EAF9E6}"
2425
EndProject
2526
Global
2627
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2728
Debug|Any CPU = Debug|Any CPU
2829
Release|Any CPU = Release|Any CPU
2930
EndGlobalSection
3031
GlobalSection(ProjectConfigurationPlatforms) = postSolution
31-
{8D6C0BB9-D04D-49B6-9043-4A776AD275D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32-
{8D6C0BB9-D04D-49B6-9043-4A776AD275D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
33-
{8D6C0BB9-D04D-49B6-9043-4A776AD275D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
34-
{8D6C0BB9-D04D-49B6-9043-4A776AD275D5}.Release|Any CPU.Build.0 = Release|Any CPU
35-
{3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36-
{3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Debug|Any CPU.Build.0 = Debug|Any CPU
37-
{3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Release|Any CPU.ActiveCfg = Release|Any CPU
38-
{3C2D8E01-5580-426A-BDD9-EC59CD98E618}.Release|Any CPU.Build.0 = Release|Any CPU
32+
{727C1498-20A8-4C1A-BE5F-8AB762F920DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33+
{727C1498-20A8-4C1A-BE5F-8AB762F920DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
34+
{727C1498-20A8-4C1A-BE5F-8AB762F920DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
35+
{727C1498-20A8-4C1A-BE5F-8AB762F920DC}.Release|Any CPU.Build.0 = Release|Any CPU
36+
{C88A987D-3E79-481C-9DD7-441371EAF9E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
37+
{C88A987D-3E79-481C-9DD7-441371EAF9E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
38+
{C88A987D-3E79-481C-9DD7-441371EAF9E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
39+
{C88A987D-3E79-481C-9DD7-441371EAF9E6}.Release|Any CPU.Build.0 = Release|Any CPU
3940
EndGlobalSection
4041
GlobalSection(SolutionProperties) = preSolution
4142
HideSolutionNode = FALSE
4243
EndGlobalSection
4344
GlobalSection(NestedProjects) = preSolution
44-
{8D6C0BB9-D04D-49B6-9043-4A776AD275D5} = {037440DE-440B-4129-9F7A-09B42D00397E}
45-
{3C2D8E01-5580-426A-BDD9-EC59CD98E618} = {9D8490A7-A075-4E53-A5F2-A960CF4DB3E7}
45+
{727C1498-20A8-4C1A-BE5F-8AB762F920DC} = {037440DE-440B-4129-9F7A-09B42D00397E}
46+
{C88A987D-3E79-481C-9DD7-441371EAF9E6} = {9D8490A7-A075-4E53-A5F2-A960CF4DB3E7}
47+
EndGlobalSection
48+
GlobalSection(ExtensibilityGlobals) = postSolution
49+
SolutionGuid = {F7520405-4472-4800-B649-95134A0863F4}
4650
EndGlobalSection
4751
EndGlobal
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<VersionPrefix>2.0.2</VersionPrefix>
5+
<TargetFrameworks>net45;netstandard1.0</TargetFrameworks>
6+
<AssemblyName>Serilog.Sinks.Observable</AssemblyName>
7+
<AssemblyOriginatorKeyFile>../../assets/Serilog.snk</AssemblyOriginatorKeyFile>
8+
<SignAssembly>true</SignAssembly>
9+
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
10+
<PackageId>Serilog.Sinks.Observable</PackageId>
11+
<PackageTags>serilog;observable;reactive</PackageTags>
12+
<PackageIconUrl>http://serilog.net/images/serilog-sink-nuget.png</PackageIconUrl>
13+
<PackageProjectUrl>http://serilog.net</PackageProjectUrl>
14+
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
15+
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
16+
</PropertyGroup>
17+
18+
<ItemGroup>
19+
<PackageReference Include="Serilog" Version="2.0.0" />
20+
</ItemGroup>
21+
22+
</Project>

src/Serilog.Sinks.Observable/Serilog.Sinks.Observable.xproj

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/Serilog.Sinks.Observable/Sinks/Observable/ObservableSink.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2013-2016 Serilog Contributors
1+
// Copyright 2013-2017 Serilog Contributors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -38,10 +38,8 @@ sealed class Unsubscriber : IDisposable
3838

3939
public Unsubscriber(ObservableSink sink, IObserver<LogEvent> observer)
4040
{
41-
if (sink == null) throw new ArgumentNullException(nameof(sink));
42-
if (observer == null) throw new ArgumentNullException(nameof(observer));
43-
_sink = sink;
44-
_observer = observer;
41+
_sink = sink ?? throw new ArgumentNullException(nameof(sink));
42+
_observer = observer ?? throw new ArgumentNullException(nameof(observer));
4543
}
4644

4745
public void Dispose()
@@ -124,11 +122,12 @@ public void Dispose()
124122
{
125123
if (_disposed) return;
126124

127-
_disposed = true;
128125
foreach (var observer in _observers)
129126
{
130127
observer.OnCompleted();
131128
}
129+
130+
_disposed = true;
132131
}
133132
}
134133
}

src/Serilog.Sinks.Observable/project.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)