Serilog.Sinks.Splunk.Durable.Customized 1.1.1

dotnet add package Serilog.Sinks.Splunk.Durable.Customized --version 1.1.1                
NuGet\Install-Package Serilog.Sinks.Splunk.Durable.Customized -Version 1.1.1                
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.Durable.Customized" Version="1.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Serilog.Sinks.Splunk.Durable.Customized --version 1.1.1                
#r "nuget: Serilog.Sinks.Splunk.Durable.Customized, 1.1.1"                
#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.
// Install Serilog.Sinks.Splunk.Durable.Customized as a Cake Addin
#addin nuget:?package=Serilog.Sinks.Splunk.Durable.Customized&version=1.1.1

// Install Serilog.Sinks.Splunk.Durable.Customized as a Cake Tool
#tool nuget:?package=Serilog.Sinks.Splunk.Durable.Customized&version=1.1.1                

Note

This package is based upon Serilog.Sinks.Splunk.Durable. It includes the work from this Pull Request.

Serilog.Sinks.Splunk.Durable.Customized NuGet

A Resilient and durable Serilog sink that writes events to the Splunk (based on Seq sink https://datalust.co/seq). Supports .NET 4.5+, .NET Core, and platforms compatible with the .NET Platform Standard 1.1 including Windows 8 & UWP, Windows Phone and Xamarin.

Getting started

Install the Serilog.Sinks.Splunk.Durable package from Visual Studio's NuGet console:

PM> Install-Package Serilog.Sinks.Splunk.Durable

Point the logger to Splunk Event Collector:

Log.Logger = new LoggerConfiguration()
                     .WriteTo
                     .SplunkEventCollector(splunkHost: "http://localhost:8088",
                                           eventCollectorToken: "1e3fa824-6c86-4e14-a1de-ce87d1bb5dd8",
                                           bufferFileFullName: "Test.log")    
                     .CreateLogger();

And use the Serilog logging methods to associate named properties with log events:

Log.Error("Failed to log on user {ContactId}", contactId);

JSON appsettings.json configuration

To use the Splunk.Plus sink with Microsoft.Extensions.Configuration, for example with ASP.NET Core or .NET Core, use the Serilog.Settings.Configuration package. First install that package if you have not already done so:

Install-Package Serilog.Settings.Configuration

Instead of configuring the sink directly in code, call ReadFrom.Configuration():

var configuration = new ConfigurationBuilder()
    .AddJsonFile("appsettings.json")
    .Build();

var logger = new LoggerConfiguration()
    .ReadFrom.Configuration(configuration)
    .CreateLogger();

In your appsettings.json file, under the Serilog node, :

{
  "Serilog": {
    "Using": [ "Serilog.Sinks.Splunk.Durable" ],
    "WriteTo": [
       {
        "Name": "SplunkEventCollector",
        "Args": {
          "splunkHost": "http://localhost:8088",
          "eventCollectorToken": "1e3fa824-6c86-4e14-a1de-ce87d1bb5dd8",
          "bufferFileFullName": "log-buffer.txt"
        }
      }
    ]
  }
}

See the XML <appSettings> example above for a discussion of available Args options.

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 was computed.  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. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard1.3 is compatible.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  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 tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.1 11,534 7/10/2023