@@ -20,19 +20,48 @@ PM> Install-Package Serilog.Sinks.Splunk
2020OR
2121
2222``` bash
23- > dotnet add package Serilog.Sinks.Splunk
23+ $ dotnet add package Serilog.Sinks.Splunk
2424```
2525
26- Using the Event Collector (Splunk 6.3 and above)
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.
2732
2833``` csharp
2934var log = new LoggerConfiguration ()
30- .WriteTo .EventCollector (" https://mysplunk:8088/services/collector" , " myeventcollectortoken" )
35+ .WriteTo .EventCollector (" https://mysplunk:8088/services/collector" , " myeventcollectortoken" )
3136 .CreateLogger ();
3237```
3338
34- 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+ ```
3563
64+ More information about Serilog is available on the [ wiki] ( https://github.com/serilog/serilog-sinks-splunk/wiki ) .
3665### Build status
3766
3867Branch | AppVeyor | Travis
0 commit comments