Serilog.Sinks.Discord.Tadeucci 1.3.0

dotnet add package Serilog.Sinks.Discord.Tadeucci --version 1.3.0
                    
NuGet\Install-Package Serilog.Sinks.Discord.Tadeucci -Version 1.3.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="Serilog.Sinks.Discord.Tadeucci" Version="1.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Serilog.Sinks.Discord.Tadeucci" Version="1.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Serilog.Sinks.Discord.Tadeucci" />
                    
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.Discord.Tadeucci --version 1.3.0
                    
#r "nuget: Serilog.Sinks.Discord.Tadeucci, 1.3.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.
#:package Serilog.Sinks.Discord.Tadeucci@1.3.0
                    
#: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.Discord.Tadeucci&version=1.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Serilog.Sinks.Discord.Tadeucci&version=1.3.0
                    
Install as a Cake Tool

This fork changes:

  • Updated to .NET 8;
  • Applied the following PR's:
  • Removed package Discord.Net.Webhook so it doesn't use Newtonsoft.Json anymore;

Serilog.Sinks.Discord

Writes Serilog events to a given Discord Channel.

Serilog Serilog

Installation

Install-Package Serilog.Sinks.Discord

Note that a Discord Webhook is required in order to configure the sink, if you don't know how the create a Webhook please refer to the official documentation.

Configuration

Available Log Levels
  • Verbose
  • Debug
  • Information
  • Warning
  • Error
In Code Configuration

To configure the Serilog sink for Discord, add the following section to your LoggerConfiguration:

Log.Logger = new  LoggerConfiguration()
	.WriteTo.Discord({WebhookId}, {WebhookToken}, {LogEventLevel.LogLevel}, {botName}, {avatarURL}, {Properties})
	.CreateLogger();
Optoinal fields
  • LogLevel: Must be specified in the format "LogEventLevel.Debug/Warning/etc." Defaults to "Debug" if not provided.
  • botName: If not in use, set to "null". Note: If avatarURL is set, botName is required.
  • avatarURL
  • Properties: Additional properties to include in the log message.
App Settings Configuration

To configure the Serilog sink for Discord, add the following section to your appsettings.json:

{
  "Serilog": {
    "Using": [
      "Serilog.Sinks.Discord"
    ],
    "WriteTo": [
      {
        "Name": "Discord",
        "Args": {
          "webhookId": "YOUR_DISCORD_WEBHOOK_ID",
          "webhookToken": "YOUR_DISCORD_WEBHOOK_TOKEN",
          "botName": "OPTIONAL_BOT_NAME",
          "avatarURL": "OPTIONAL_AVATAR_URL",
          "minimumLevel": "LOG_LEVEL",
          "Properties": {
            "Property1": "Value1",
            "Property2": "Value2"
          }
        }
      }
    ]
  }
}
Configuration Details:
  • webhookId: The ID of the Discord webhook. (Required)
  • webhookToken: The token of the Discord webhook. (Required)
  • botName: The name under which the log messages will be sent. If left empty or not provided, no name will be displayed.
  • avatarURL: URL pointing to an avatar image for the bot. If left empty or not provided, no avatar will be displayed.
  • minimumLevel: Minimum log level required for messages to be sent to Discord. (e.g., "Debug", "Information")
  • Properties: Additional properties to include in the log message. This can be used to add custom fields to the log messages sent to Discord.

Note: Remember to replace placeholders (YOUR_DISCORD_WEBHOOK_ID, YOUR_DISCORD_WEBHOOK_TOKEN, etc.) with actual values when integrating this into your project.

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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 was computed.  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. 
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.3.0 376 6/8/2025