Skip to content

Commit 111a652

Browse files
committed
Added support for .NET Standard
* The sink now checks for min log level to save us from doing extra allocations
1 parent f8b5e1a commit 111a652

19 files changed

+489
-262
lines changed

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
root=true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Auto detect text files and perform LF normalization
2+
3+
* text=auto

.gitignore

Lines changed: 158 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,51 @@
1-
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
2-
[Bb]in/
3-
[Oo]bj/
4-
5-
# mstest test results
6-
TestResults
7-
81
## Ignore Visual Studio temporary files, build results, and
92
## files generated by popular Visual Studio add-ons.
103

114
# User-specific files
125
*.suo
136
*.user
7+
*.userosscache
148
*.sln.docstates
159

10+
# User-specific files (MonoDevelop/Xamarin Studio)
11+
*.userprefs
12+
1613
# Build results
1714
[Dd]ebug/
15+
[Dd]ebugPublic/
1816
[Rr]elease/
17+
[Rr]eleases/
1918
x64/
19+
x86/
20+
bld/
21+
[Bb]in/
22+
[Oo]bj/
23+
24+
# Visual Studio 2015 cache/options directory
25+
.vs/
26+
# Uncomment if you have tasks that create the project's static files in wwwroot
27+
#wwwroot/
28+
29+
# MSTest test Results
30+
[Tt]est[Rr]esult*/
31+
[Bb]uild[Ll]og.*
32+
33+
# NUNIT
34+
*.VisualState.xml
35+
TestResult.xml
36+
37+
# Build Results of an ATL Project
38+
[Dd]ebugPS/
39+
[Rr]eleasePS/
40+
dlldata.c
41+
42+
# DNX
43+
project.lock.json
44+
artifacts/
45+
2046
*_i.c
2147
*_p.c
48+
*_i.h
2249
*.ilk
2350
*.meta
2451
*.obj
@@ -32,35 +59,67 @@ x64/
3259
*.tli
3360
*.tlh
3461
*.tmp
62+
*.tmp_proj
3563
*.log
3664
*.vspscc
3765
*.vssscc
3866
.builds
67+
*.pidb
68+
*.svclog
69+
*.scc
70+
71+
# Chutzpah Test files
72+
_Chutzpah*
3973

4074
# Visual C++ cache files
4175
ipch/
4276
*.aps
4377
*.ncb
78+
*.opendb
4479
*.opensdf
4580
*.sdf
81+
*.cachefile
4682

4783
# Visual Studio profiler
4884
*.psess
4985
*.vsp
5086
*.vspx
87+
*.sap
88+
89+
# TFS 2012 Local Workspace
90+
$tf/
5191

5292
# Guidance Automation Toolkit
5393
*.gpState
5494

5595
# ReSharper is a .NET coding add-in
56-
_ReSharper*
96+
_ReSharper*/
97+
*.[Rr]e[Ss]harper
98+
*.DotSettings.user
99+
100+
# JustCode is a .NET coding add-in
101+
.JustCode
102+
103+
# TeamCity is a build add-in
104+
_TeamCity*
105+
106+
# DotCover is a Code Coverage Tool
107+
*.dotCover
57108

58109
# NCrunch
59-
*.ncrunch*
110+
_NCrunch_*
60111
.*crunch*.local.xml
112+
nCrunchTemp_*
113+
114+
# MightyMoose
115+
*.mm.*
116+
AutoTest.Net/
61117

62-
# Installshield output folder
63-
[Ee]xpress
118+
# Web workbench (sass)
119+
.sass-cache/
120+
121+
# Installshield output folder
122+
[Ee]xpress/
64123

65124
# DocProject is a documentation generator add-in
66125
DocProject/buildhelp/
@@ -73,39 +132,105 @@ DocProject/Help/Html2
73132
DocProject/Help/html
74133

75134
# Click-Once directory
76-
publish
135+
publish/
77136

78137
# Publish Web Output
79-
*.Publish.xml
80-
81-
# NuGet Packages Directory
82-
packages
83-
84-
# NuGet package output
138+
*.[Pp]ublish.xml
139+
*.azurePubxml
140+
# TODO: Comment the next line if you want to checkin your web deploy settings
141+
# but database connection strings (with potential passwords) will be unencrypted
142+
*.pubxml
143+
*.publishproj
144+
145+
# NuGet Packages
85146
*.nupkg
86-
87-
# Windows Azure Build Output
88-
csx
147+
# The packages folder can be ignored because of Package Restore
148+
**/packages/*
149+
# except build/, which is used as an MSBuild target.
150+
!**/packages/build/
151+
# Uncomment if necessary however generally it will be regenerated when needed
152+
#!**/packages/repositories.config
153+
# NuGet v3's project.json files produces more ignoreable files
154+
*.nuget.props
155+
*.nuget.targets
156+
157+
# Microsoft Azure Build Output
158+
csx/
89159
*.build.csdef
90160

161+
# Microsoft Azure Emulator
162+
ecf/
163+
rcf/
164+
165+
# Microsoft Azure ApplicationInsights config file
166+
ApplicationInsights.config
167+
91168
# Windows Store app package directory
92169
AppPackages/
170+
BundleArtifacts/
171+
172+
# Visual Studio cache files
173+
# files ending in .cache can be ignored
174+
*.[Cc]ache
175+
# but keep track of directories ending in .cache
176+
!*.[Cc]ache/
93177

94178
# Others
95-
[Bb]in
96-
[Oo]bj
97-
sql
98-
TestResults
99-
[Tt]est[Rr]esult*
100-
*.Cache
101-
ClientBin
102-
[Ss]tyle[Cc]op.*
179+
ClientBin/
103180
~$*
181+
*~
104182
*.dbmdl
105-
Generated_Code #added for RIA/Silverlight projects
106-
107-
# Backup & report files from converting an old project file to a newer
108-
# Visual Studio version. Backup files are not needed, because we have git ;-)
183+
*.dbproj.schemaview
184+
*.pfx
185+
*.publishsettings
186+
node_modules/
187+
orleans.codegen.cs
188+
189+
# RIA/Silverlight projects
190+
Generated_Code/
191+
192+
# Backup & report files from converting an old project file
193+
# to a newer Visual Studio version. Backup files are not needed,
194+
# because we have git ;-)
109195
_UpgradeReport_Files/
110196
Backup*/
111197
UpgradeLog*.XML
198+
UpgradeLog*.htm
199+
200+
# SQL Server files
201+
*.mdf
202+
*.ldf
203+
204+
# Business Intelligence projects
205+
*.rdl.data
206+
*.bim.layout
207+
*.bim_*.settings
208+
209+
# Microsoft Fakes
210+
FakesAssemblies/
211+
212+
# GhostDoc plugin setting file
213+
*.GhostDoc.xml
214+
215+
# Node.js Tools for Visual Studio
216+
.ntvs_analysis.dat
217+
218+
# Visual Studio 6 build log
219+
*.plg
220+
221+
# Visual Studio 6 workspace options file
222+
*.opt
223+
224+
# Visual Studio LightSwitch build output
225+
**/*.HTMLClient/GeneratedArtifacts
226+
**/*.DesktopClient/GeneratedArtifacts
227+
**/*.DesktopClient/ModelManifest.xml
228+
**/*.Server/GeneratedArtifacts
229+
**/*.Server/ModelManifest.xml
230+
_Pvt_Extensions
231+
232+
# Paket dependency manager
233+
.paket/paket.exe
234+
235+
# FAKE - F# Make
236+
.fake/

Build.ps1

Lines changed: 9 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,15 @@
1-
param(
2-
[String] $majorMinor = "0.0", # 2.0
3-
[String] $patch = "0", # $env:APPVEYOR_BUILD_VERSION
4-
[String] $customLogger = "", # C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll
5-
[Switch] $notouch,
6-
[String] $sln # e.g serilog-sink-name
7-
)
1+
Push-Location $PSScriptRoot
82

9-
function Set-AssemblyVersions($informational, $assembly)
10-
{
11-
(Get-Content assets/CommonAssemblyInfo.cs) |
12-
ForEach-Object { $_ -replace """1.0.0.0""", """$assembly""" } |
13-
ForEach-Object { $_ -replace """1.0.0""", """$informational""" } |
14-
ForEach-Object { $_ -replace """1.1.1.1""", """$($informational).0""" } |
15-
Set-Content assets/CommonAssemblyInfo.cs
16-
}
3+
if(Test-Path .\artifacts) { Remove-Item .\artifacts -Force -Recurse }
174

18-
function Install-NuGetPackages($solution)
19-
{
20-
nuget restore $solution
21-
}
5+
& dotnet restore
226

23-
function Invoke-MSBuild($solution, $customLogger)
24-
{
25-
if ($customLogger)
26-
{
27-
msbuild "$solution" /verbosity:minimal /p:Configuration=Release /logger:"$customLogger"
28-
}
29-
else
30-
{
31-
msbuild "$solution" /verbosity:minimal /p:Configuration=Release
32-
}
33-
}
7+
$revision = @{ $true = $env:APPVEYOR_BUILD_NUMBER; $false = 1 }[$env:APPVEYOR_BUILD_NUMBER -ne $NULL];
348

35-
function Invoke-NuGetPackProj($csproj, $version)
36-
{
37-
Write-Output "CsProj: $csproj"
38-
nuget pack -Prop Configuration=Release -Symbols $csproj -Version $version -Verbosity detailed
39-
}
9+
Push-Location src/Serilog.Sinks.Exceptionless
4010

41-
function Invoke-NuGetPackSpec($nuspec, $version)
42-
{
43-
nuget pack $nuspec -Version $version -OutputDirectory ..\..\ -Verbosity detailed
44-
}
11+
& dotnet pack -c Release -o ..\..\.\artifacts --version-suffix=$revision
12+
if($LASTEXITCODE -ne 0) { exit 1 }
4513

46-
function Invoke-NuGetPack($version)
47-
{
48-
ls src/**/*.csproj |
49-
Where-Object { -not ($_.Name -like "*net40*") } |
50-
ForEach-Object { Invoke-NuGetPackProj $_ $version }
51-
}
52-
53-
function Invoke-Build($majorMinor, $patch, $customLogger, $notouch, $sln)
54-
{
55-
$package="$majorMinor.$patch"
56-
$slnfile = "$sln.sln"
57-
58-
Write-Output "$sln $package"
59-
60-
if (-not $notouch)
61-
{
62-
$assembly = "$majorMinor.0.0"
63-
64-
Write-Output "Assembly version will be set to $assembly"
65-
Set-AssemblyVersions $package $assembly
66-
}
67-
68-
Install-NuGetPackages $slnfile
69-
70-
Invoke-MSBuild $slnfile $customLogger
71-
72-
Invoke-NuGetPack $package
73-
}
74-
75-
$ErrorActionPreference = "Stop"
76-
77-
if (-not $sln)
78-
{
79-
$slnfull = ls *.sln |
80-
Where-Object { -not ($_.Name -like "*net40*") } |
81-
Select -first 1
82-
83-
$sln = $slnfull.BaseName
84-
}
85-
86-
Invoke-Build $majorMinor $patch $customLogger $notouch $sln
14+
Pop-Location
15+
Pop-Location

CHANGES.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
3.0.0
2+
- Added support for Exceptionless 4.0.
3+
- DotNet Core support
14
2.0.0
2-
* Moved the Elasticsearch sink from its [original location](https://github.com/serilog/serilog)
3-
* Added support for Exceptionless 2.0.
5+
- Moved the Elasticsearch sink from its [original location](https://github.com/serilog/serilog)
6+
- Added support for Exceptionless 2.0.

0 commit comments

Comments
 (0)