Skip to content

Commit 3a2107e

Browse files
authored
Merge pull request #103 from serilog/dev
3.0 Release
2 parents 63e95b9 + 80d68c0 commit 3a2107e

31 files changed

+427
-206
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bin\
2+
obj\

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,9 @@ _Pvt_Extensions
234234

235235
# FAKE - F# Make
236236
.fake/
237+
238+
.vscode/
239+
240+
sample/Sample/out/
241+
242+
.DS_Store

CHANGES.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## 3.0.0
2+
- [#76](https://github.com/serilog/serilog-sinks-splunk/issues/76) Add strong naming/signing to `Serilog.Sinks.Splunk`.
3+
- [#88](https://github.com/serilog/serilog-sinks-splunk/issues/88) Split Sinks into separate packages for maintainability.
4+
- *NOTE* Breaking changes. TCP & UDP Sinks moved to new packages
5+
- Serilog.Sinks.Splunk (3.0.x)
6+
- Serilog.Sinks.Splunk.TCP (1.0.x)
7+
- Serilog.Sinks.Splunk.UDP (1.0.x)
8+
9+
## 2.5.0
10+
- [#78](https://github.com/serilog/serilog-sinks-splunk/issues/78) Update `System.Net.Http` references to match other similar sinks.
11+
- [#79](https://github.com/serilog/serilog-sinks-splunk/issues/79) Addition of optional `LoggingLevelSwitch` param to EventCollector sink.
12+
113
## 2.4.0
214
- [#62](https://github.com/serilog/serilog-sinks-splunk/issues/62) Default fields added by Serilog to splunk
315
- [#63](https://github.com/serilog/serilog-sinks-splunk/issues/63) Possible thread leak when ILogger instances are disposed

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM microsoft/dotnet:2.1-sdk AS build
2+
ADD . /
3+
WORKDIR /sample/Sample
4+
RUN dotnet restore
5+
RUN dotnet publish -c Release -o out -f netcoreapp2.0
6+
7+
FROM microsoft/dotnet:2.1-runtime AS runtime
8+
WORKDIR /sample/Sample
9+
COPY --from=build /sample/Sample/out ./
10+
ENTRYPOINT ["dotnet", "Sample.dll"]

README.md

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,67 @@
11
# Serilog.Sinks.Splunk
22

3-
[![Build status](https://ci.appveyor.com/api/projects/status/yt40wg34t8oj61al?svg=true)](https://ci.appveyor.com/project/serilog/serilog-sinks-splunk)
4-
[![NuGet Version](http://img.shields.io/nuget/v/Serilog.Sinks.Splunk.svg?style=flat)](https://www.nuget.org/packages/Serilog.Sinks.Splunk/)
3+
[![Build status](https://ci.appveyor.com/api/projects/status/yt40wg34t8oj61al?svg=true)](https://ci.appveyor.com/project/serilog/serilog-sinks-splunk) ![NuGet Version](https://buildstats.info/nuget/Serilog.Sinks.Splunk)
54
[![Join the chat at https://gitter.im/serilog/serilog](https://img.shields.io/gitter/room/serilog/serilog.svg)](https://gitter.im/serilog/serilog)
65

76
A Serilog sink that writes events to the [Splunk](https://splunk.com). Supports .NET 4.5+, .NET Core, and platforms compatible with the [.NET Platform Standard](https://github.com/dotnet/corefx/blob/master/Documentation/architecture/net-platform-standard.md) 1.1 including Windows 8 & UWP, Windows Phone and Xamarin.
87

9-
[![Package Logo](http://serilog.net/images/serilog-sink-nuget.png)](http://nuget.org/packages/serilog.sinks.splunk)
8+
[![Package Logo](https://serilog.net/images/serilog-sink-nuget.png)](https://nuget.org/packages/serilog.sinks.splunk)
109

11-
**Package** - [Serilog.Sinks.Splunk](http://nuget.org/packages/serilog.sinks.splunk)
10+
**Package** - [Serilog.Sinks.Splunk](https://nuget.org/packages/serilog.sinks.splunk)
1211

1312
## Getting started
1413

15-
To get started install the *Serilog.Sinks.Splunk* package from Visual Studio's *NuGet* console:
14+
To get started install the *Serilog.Sinks.Splunk* package:
1615

1716
```powershell
1817
PM> Install-Package Serilog.Sinks.Splunk
1918
```
2019

21-
Using the Event Collector (Splunk 6.3 and above)
20+
OR
2221

23-
```csharp
22+
```bash
23+
$ dotnet add package Serilog.Sinks.Splunk
24+
```
25+
26+
If using the `TCP` or `UDP` sinks install the following packages
27+
28+
* TCP: `Serilog.Sinks.Splunk.TCP`
29+
* UDP: `Serilog.Sinks.Splunk.UDP`
30+
31+
To start using the Splunk Event Collector (Splunk 6.3 and above), logging can be setup as follows.
32+
33+
```csharp
2434
var log = new LoggerConfiguration()
25-
.WriteTo.EventCollector("https://mysplunk:8088/services/collector", "myeventcollectortoken")
35+
.WriteTo.EventCollector("https://mysplunk:8088/services/collector", "myeventcollectortoken")
2636
.CreateLogger();
2737
```
2838

29-
More information is available on the [wiki](https://github.com/serilog/serilog-sinks-splunk/wiki).
39+
If using `appsettings.json` for configuration the following example illustrates using the Event Collector and Console sinks.
40+
41+
```javascript
42+
{
43+
"Serilog": {
44+
"Using": ["Serilog.Sinks.Console", "Serilog.Sinks.Splunk"],
45+
"MinimumLevel": "Information",
46+
"WriteTo": [{
47+
"Name": "Console"
48+
},
49+
{
50+
"Name": "EventCollector",
51+
"Args": {
52+
"splunkHost": "http://splunk:8088",
53+
"eventCollectorToken": "00112233-4455-6677-8899-AABBCCDDEEFF"
54+
}
55+
}
56+
],
57+
"Properties": {
58+
"Application": "Serilog Splunk Console Sample"
59+
}
60+
}
61+
}
62+
```
3063

64+
More information about Serilog is available on the [wiki](https://github.com/serilog/serilog-sinks-splunk/wiki).
3165
### Build status
3266

3367
Branch | AppVeyor | Travis

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ artifacts:
1010
deploy:
1111
- provider: NuGet
1212
api_key:
13-
secure: nvZ/z+pMS91b3kG4DgfES5AcmwwGoBYQxr9kp4XiJHj25SAlgdIxFx++1N0lFH2x
13+
secure: bd9z4P73oltOXudAjPehwp9iDKsPtC+HbgshOrSgoyQKr5xVK+bxJQngrDJkHdY8
1414
skip_symbols: true
1515
on:
1616
branch: /^(master|dev)$/

assets/CommonAssemblyInfo.cs

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

build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ set -e
33
dotnet --info
44
dotnet restore
55

6-
for path in src/**/*.csproj; do
6+
# Until # 65 is addressed build only core package. When available move to netstandard for all packages
7+
for path in src/**/Serilog.Sinks.Splunk.csproj; do
78
dotnet build -f netstandard1.1 -c Release ${path}
89
dotnet build -f netstandard1.3 -c Release ${path}
910
done

docker-compose.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: '2'
2+
services:
3+
splunk:
4+
build: ./sample/splunk
5+
image: serilog-splunk
6+
ports:
7+
- 8000:8000
8+
- 8088:8088
9+
- 8089:8089
10+
environment:
11+
SPLUNK_START_ARGS: "--accept-license --answer-yes --seed-passwd changeme"
12+
SPLUNK_USER: "root"
13+
sampleconsoleapp:
14+
depends_on:
15+
- "splunk"
16+
build: .
17+
image: serilog-console-sample

run_sample.sh

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

0 commit comments

Comments
 (0)