LionDeer.Serilog.Sinks.Graylog 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package LionDeer.Serilog.Sinks.Graylog --version 1.0.0
NuGet\Install-Package LionDeer.Serilog.Sinks.Graylog -Version 1.0.0
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="LionDeer.Serilog.Sinks.Graylog" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LionDeer.Serilog.Sinks.Graylog --version 1.0.0
#r "nuget: LionDeer.Serilog.Sinks.Graylog, 1.0.0"
#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 LionDeer.Serilog.Sinks.Graylog as a Cake Addin
#addin nuget:?package=LionDeer.Serilog.Sinks.Graylog&version=1.0.0

// Install LionDeer.Serilog.Sinks.Graylog as a Cake Tool
#tool nuget:?package=LionDeer.Serilog.Sinks.Graylog&version=1.0.0

Status

Build status codecov

serilog-sinks-graylog

NuGet Downloads

serilog-sinks-graylog-Batching

NuGet Downloads

What is this sink ?

The Serilog Graylog sink project is a sink (basically a writer) for the Serilog logging framework. Structured log events are written to sinks and each sink is responsible for writing it to its own backend, database, store etc. This sink delivers the data to Graylog2, a NoSQL search engine.

Quick start

Install-Package serilog.sinks.graylog

Register the sink in code.

var loggerConfig = new LoggerConfiguration()
    .WriteTo.Graylog(new GraylogSinkOptions
      {
          HostnameOrAddress = "localhost",
          Port = 12201
      });

...or alternatively configure the sink in appsettings.json configuration like so:

{
  "Serilog": {
    "Using": ["Serilog.Sinks.Graylog"],
    "MinimumLevel": "Debug",
    "WriteTo": [
    {
        "Name": "Graylog",
        "Args": {
            "hostnameOrAddress": "localhost",
            "port": "12201",
            "transportType": "Udp"
        }
    }
    ]
  }
}

Note that because of the limitations of the Serilog.Settings.Configuration package, you cannot configure IGelfConverter using json.

by default udp protocol is using, if you want to use http define sink options like

new GraylogSinkOptions
      {
          HostnameOrAddress = "http://localhost",
          Port = 12201,
          TransportType = TransportType.Http,
      }

All options you can see at https://github.com/whir1/serilog-sinks-graylog/blob/master/src/Serilog.Sinks.Graylog.Core/GraylogSinkOptions.cs

You can create your own implementation of transports or converter and set it to options. But maybe i'll delete this feature in the future

PS this is my first package XD.

PPS I am sorry for my language, but my second language is C#

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  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 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 net46 is compatible.  net461 is compatible.  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

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.0.1 181 2/8/2023
1.0.0 163 2/8/2023

Update package dependencies