Skip to content

Commit 021a0b6

Browse files
authored
Merge pull request #24 from serilog/dev
Release 2.0
2 parents 0c37e28 + 74bbc9e commit 021a0b6

40 files changed

+625
-835
lines changed

.gitignore

Lines changed: 63 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,33 @@
44
# User-specific files
55
*.suo
66
*.user
7+
*.userosscache
78
*.sln.docstates
89

10+
# User-specific files (MonoDevelop/Xamarin Studio)
11+
*.userprefs
12+
913
# Build results
1014
[Dd]ebug/
1115
[Dd]ebugPublic/
1216
[Rr]elease/
1317
[Rr]eleases/
1418
x64/
1519
x86/
16-
build/
1720
bld/
1821
[Bb]in/
1922
[Oo]bj/
2023

21-
# Roslyn cache directories
22-
*.ide/
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/
2328

2429
# MSTest test Results
2530
[Tt]est[Rr]esult*/
2631
[Bb]uild[Ll]og.*
2732

28-
#NUNIT
33+
# NUNIT
2934
*.VisualState.xml
3035
TestResult.xml
3136

@@ -34,6 +39,10 @@ TestResult.xml
3439
[Rr]eleasePS/
3540
dlldata.c
3641

42+
# DNX
43+
project.lock.json
44+
artifacts/
45+
3746
*_i.c
3847
*_p.c
3948
*_i.h
@@ -66,6 +75,7 @@ _Chutzpah*
6675
ipch/
6776
*.aps
6877
*.ncb
78+
*.opendb
6979
*.opensdf
7080
*.sdf
7181
*.cachefile
@@ -74,6 +84,7 @@ ipch/
7484
*.psess
7585
*.vsp
7686
*.vspx
87+
*.sap
7788

7889
# TFS 2012 Local Workspace
7990
$tf/
@@ -86,7 +97,7 @@ _ReSharper*/
8697
*.[Rr]e[Ss]harper
8798
*.DotSettings.user
8899

89-
# JustCode is a .NET coding addin-in
100+
# JustCode is a .NET coding add-in
90101
.JustCode
91102

92103
# TeamCity is a build add-in
@@ -98,6 +109,7 @@ _TeamCity*
98109
# NCrunch
99110
_NCrunch_*
100111
.*crunch*.local.xml
112+
nCrunchTemp_*
101113

102114
# MightyMoose
103115
*.mm.*
@@ -136,28 +148,43 @@ publish/
136148
**/packages/*
137149
# except build/, which is used as an MSBuild target.
138150
!**/packages/build/
139-
# If using the old MSBuild-Integrated Package Restore, uncomment this:
151+
# Uncomment if necessary however generally it will be regenerated when needed
140152
#!**/packages/repositories.config
153+
# NuGet v3's project.json files produces more ignoreable files
154+
*.nuget.props
155+
*.nuget.targets
141156

142-
# Windows Azure Build Output
157+
# Microsoft Azure Build Output
143158
csx/
144159
*.build.csdef
145160

161+
# Microsoft Azure Emulator
162+
ecf/
163+
rcf/
164+
165+
# Microsoft Azure ApplicationInsights config file
166+
ApplicationInsights.config
167+
146168
# Windows Store app package directory
147169
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/
148177

149178
# Others
150-
sql/
151-
*.Cache
152179
ClientBin/
153-
[Ss]tyle[Cc]op.*
154180
~$*
155181
*~
156182
*.dbmdl
157183
*.dbproj.schemaview
158184
*.pfx
159185
*.publishsettings
160186
node_modules/
187+
orleans.codegen.cs
161188

162189
# RIA/Silverlight projects
163190
Generated_Code/
@@ -181,3 +208,29 @@ UpgradeLog*.htm
181208

182209
# Microsoft Fakes
183210
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/

.nuget/packages.config

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

.travis.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
language: csharp
2+
3+
#dotnet cli require Ubuntu 14.04
4+
sudo: required
5+
dist: trusty
6+
7+
#dotnet cli require OSX 10.10
8+
osx_image: xcode7.1
9+
10+
addons:
11+
apt:
12+
packages:
13+
- gettext
14+
- libcurl4-openssl-dev
15+
- libicu-dev
16+
- libssl-dev
17+
- libunwind8
18+
- zlib1g
19+
20+
os:
21+
- osx
22+
- linux
23+
24+
env:
25+
matrix:
26+
- CLI_VERSION=1.0.0-preview2-003121
27+
- CLI_VERSION=Latest
28+
29+
matrix:
30+
allow_failures:
31+
- env: CLI_VERSION=Latest
32+
33+
before_install:
34+
- if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl; brew link --force openssl; fi
35+
# Download script to install dotnet cli
36+
- if test "$CLI_OBTAIN_URL" == ""; then export CLI_OBTAIN_URL="https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview2/scripts/obtain/dotnet-install.sh"; fi
37+
- curl -L --create-dirs $CLI_OBTAIN_URL -o ./scripts/obtain/install.sh
38+
- find ./scripts -name "*.sh" -exec chmod +x {} \;
39+
- export DOTNET_INSTALL_DIR="$PWD/.dotnetcli"
40+
# use bash to workaround bug https://github.com/dotnet/cli/issues/1725
41+
- sudo bash ./scripts/obtain/install.sh --channel "preview" --version "$CLI_VERSION" --install-dir "$DOTNET_INSTALL_DIR" --no-path
42+
# add dotnet to PATH
43+
- export PATH="$DOTNET_INSTALL_DIR:$PATH"
44+
45+
script:
46+
- ./build.sh

Build.ps1

Lines changed: 9 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,16 @@
1-
param(
2-
[String] $majorMinor = "1.8", # 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-
)
1+
Push-Location $PSScriptRoot
72

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

17-
function Install-NuGetPackages()
18-
{
19-
nuget restore serilog-sinks-splunk.sln
20-
}
5+
& dotnet restore
216

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

34-
function Invoke-NuGetPackProj($csproj)
35-
{
36-
nuget pack -Prop Configuration=Release -Symbols $csproj
37-
}
9+
Push-Location src/Serilog.Sinks.Splunk
3810

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

44-
function Invoke-NuGetPack($version)
45-
{
46-
pushd .\src\Serilog.Sinks.Splunk
47-
Invoke-NuGetPackSpec "Serilog.Sinks.Splunk.nuspec" $version
48-
popd
49-
}
5014

51-
function Invoke-Build($majorMinor, $patch, $customLogger, $notouch)
52-
{
53-
$package="$majorMinor.$patch"
54-
55-
Write-Output "Building Serilog.Sinks.Splunk $package"
56-
57-
if (-not $notouch)
58-
{
59-
$assembly = "$majorMinor.0.0"
60-
61-
Write-Output "Assembly version will be set to $assembly"
62-
Set-AssemblyVersions $package $assembly
63-
}
64-
65-
Install-NuGetPackages
66-
67-
Invoke-MSBuild "serilog-sinks-splunk.sln" $customLogger
68-
69-
Invoke-NuGetPack $package
70-
}
71-
72-
$ErrorActionPreference = "Stop"
73-
Invoke-Build $majorMinor $patch $customLogger $notouch
15+
Pop-Location
16+
Pop-Location

CHANGES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
##2.0
2+
- Support for DotNet Core
3+
- Event Collector fluent interface changed to `.WriteTo.EventCollector`
4+
- Event Collector Sink targeting core
5+
- TCP/UDP Sinks targeting 4.5 *ONLY*
6+
- Updated Event Collector HTTP Client to add URI endpoint to host: "services/collector" if not included.
7+
- Event Collector changed to use epoch time [#15](https://github.com/serilog/serilog-sinks-splunk/pull/15)
8+
19
##1.8
210
- Event Collector changed to use epoch time [#15](https://github.com/serilog/serilog-sinks-splunk/pull/15)
311

README.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,8 @@ Using the new Event Collector in Splunk 6.3
2121

2222
```csharp
2323
var log = new LoggerConfiguration()
24-
.WriteTo.SplunkViaEventCollector("https://mysplunk:8088/services/collector", "myeventcollectortoken")
25-
.CreateLogger();
26-
```
27-
28-
Set up to log via TCP
29-
30-
```csharp
31-
var log = new LoggerConfiguration()
32-
.WriteTo.SplunkViaTcp("127.0.0.1", 10001)
33-
.CreateLogger();
34-
```
35-
36-
Or maybe UDP
37-
38-
```csharp
39-
var log = new LoggerConfiguration()
40-
.WriteTo.SplunkViaUdp("127.0.0.1", 10000)
24+
.WriteTo.EventCollector("https://mysplunk:8088/services/collector", "myeventcollectortoken")
4125
.CreateLogger();
4226
```
4327

28+
More information is available [here](https://github.com/serilog/serilog-sinks-splunk/wiki).

appveyor.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: '{build}'
2+
skip_tags: true
3+
image: Visual Studio 2015
4+
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"
11+
build_script:
12+
- ps: ./Build.ps1
13+
test: off
14+
artifacts:
15+
- path: artifacts/Serilog.*.nupkg
16+
deploy:
17+
- provider: NuGet
18+
api_key:
19+
secure: nvZ/z+pMS91b3kG4DgfES5AcmwwGoBYQxr9kp4XiJHj25SAlgdIxFx++1N0lFH2x
20+
skip_symbols: true
21+
on:
22+
branch: master
23+
- provider: GitHub
24+
auth_token:
25+
secure: ggZTqqV1z0xecDoQbeoy3A7xikShCt9FWZIGp95dG9Fo0p5RAT9oGU0ZekHfUIwk
26+
artifact: /Serilog.*\.nupkg/
27+
tag: v$(appveyor_build_version)
28+
on:
29+
branch: master

build.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
dotnet restore
3+
for path in src/*/project.json; do
4+
dirname="$(dirname "${path}")"
5+
dotnet build ${dirname}
6+
done
7+
8+
for path in sample/project.json; do
9+
dirname="$(dirname "${path}")"
10+
dotnet build ${dirname}
11+
done

global.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"projects": [ "src", "test" ],
3+
"sdk": {
4+
"version": "1.0.0-preview1-002702"
5+
}
6+
}

run_sample.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
sh build.sh
3+
4+
cd sample
5+
dotnet run 15
6+
cd ..

0 commit comments

Comments
 (0)