Serilog.Sinks.Splunk 5.2.1-dev-00171

This is a prerelease version of Serilog.Sinks.Splunk.
dotnet add package Serilog.Sinks.Splunk --version 5.2.1-dev-00171
                    
NuGet\Install-Package Serilog.Sinks.Splunk -Version 5.2.1-dev-00171
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Serilog.Sinks.Splunk" Version="5.2.1-dev-00171" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Serilog.Sinks.Splunk" Version="5.2.1-dev-00171" />
                    
Directory.Packages.props
<PackageReference Include="Serilog.Sinks.Splunk" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Serilog.Sinks.Splunk --version 5.2.1-dev-00171
                    
#r "nuget: Serilog.Sinks.Splunk, 5.2.1-dev-00171"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Serilog.Sinks.Splunk@5.2.1-dev-00171
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Serilog.Sinks.Splunk&version=5.2.1-dev-00171&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Serilog.Sinks.Splunk&version=5.2.1-dev-00171&prerelease
                    
Install as a Cake Tool

Serilog.Sinks.Splunk

Build Status NuGet Version GitHub Discussions

A Serilog sink that writes events to the Splunk. Supports .NET 8+, .NET 9, .NET 10, and platforms compatible with the .NET Platform Standard netstandard2.0, netstandard2.1.

Package Logo

Package - Serilog.Sinks.Splunk

Getting started

To get started install the Serilog.Sinks.Splunk package:

PM> Install-Package Serilog.Sinks.Splunk

OR

$ dotnet add package Serilog.Sinks.Splunk

If using the TCP or UDP sinks install the following packages

  • TCP: Serilog.Sinks.Splunk.TCP
  • UDP: Serilog.Sinks.Splunk.UDP

To start using the Splunk Event Collector (Splunk 6.3 and above), logging can be setup as follows.

var log = new LoggerConfiguration()
    .WriteTo.EventCollector("https://mysplunk:8088/services/collector/event", "myeventcollectortoken")
    .CreateLogger();

If using appsettings.json for configuration the following example illustrates using the Event Collector and Console sinks.

{
    "Serilog": {
        "Using": ["Serilog.Sinks.Console", "Serilog.Sinks.Splunk"],
        "MinimumLevel": "Information",
        "WriteTo": [{
                "Name": "Console"
            },
            {
                "Name": "EventCollector",
                "Args": {
                    "splunkHost": "http://splunk:8088",
                    "uriPath": "services/collector/event",
                    "eventCollectorToken": "00112233-4455-6677-8899-AABBCCDDEEFF"
                }
            }
        ],
        "Properties": {
            "Application": "Serilog Splunk Console Sample"
        }
    }
}

Automatic host name

Use the includeHost option to automatically set the Splunk host metadata field to the machine name. This is opt-in and defaults to false.

var log = new LoggerConfiguration()
    .WriteTo.EventCollector(
        "https://mysplunk:8088",
        "myeventcollectortoken",
        includeHost: true)
    .CreateLogger();

Or via appsettings.json:

{
    "Name": "EventCollector",
    "Args": {
        "splunkHost": "http://splunk:8088",
        "eventCollectorToken": "00112233-4455-6677-8899-AABBCCDDEEFF",
        "includeHost": true
    }
}

If host is explicitly set, it takes precedence over includeHost.

More information about Serilog is available on the wiki.

Serilog is copyright © 2013-2026 Serilog Contributors - Provided under the Apache License, Version 2.0. Needle and thread logo a derivative of work by Kenneth Appiah.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (19)

Showing the top 5 NuGet packages that depend on Serilog.Sinks.Splunk:

Package Downloads
Serilog.Sinks.Splunk.TCP

The Splunk TCP Sink for Serilog

Serilog.Builder

Builder with my serilog common settings for use Console, Seq and Splunk sinks.

IkeMtz.NRSRx.Logging.Splunk

Package Description

Relativity.Transfer.SDK

Relativity Transfer SDK allows performing high-throughput transfers of files from and to Relativity environment.

Serilog.Sinks.Splunk.UDP

The Splunk UDP Sink for Serilog

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.2.1-dev-00171 179 3/24/2026
5.2.1-dev-00170 158 3/24/2026
5.2.1-dev-00169 156 3/24/2026
5.2.0 13,037 3/24/2026
5.2.0-dev-00168 158 3/24/2026
5.2.0-dev-00167 158 3/24/2026
5.2.0-dev-00165 160 3/24/2026
5.1.1-dev-00164 168 3/24/2026
5.1.1-dev-00153 2,038 3/17/2025
5.1.1-dev-00151 490 2/21/2025
5.1.1-dev-00150 271 2/21/2025
5.1.1-dev-00147 897 1/27/2025
5.1.1-dev-00146 293 1/27/2025
5.1.1-dev-00145 276 1/27/2025
5.1.1-dev-00144 288 1/27/2025
5.1.1-dev-00140 316 1/10/2025
5.1.1-dev-00138 294 1/9/2025
5.1.1-dev-00135 310 1/3/2025
5.1.1-dev-00133 301 1/2/2025
5.1.1-dev-00132 271 1/2/2025
Loading failed