Serilog.Sinks.Debug 3.0.0

Serilog.Sinks.Debug Build status NuGet Version Help

A Serilog sink that writes log events to the Visual Studio debug output window.

Getting started

To use the sink, first install the NuGet package:

dotnet add package Serilog.Sinks.Debug

Then enable the sink using WriteTo.Debug():

Log.Logger = new LoggerConfiguration()
    .WriteTo.Debug()
    .CreateLogger();
    
Log.Information("Hello, world!");

Log events will be printed to the debug output:

Debug Output

XML <appSettings> configuration

To use the sink with the Serilog.Settings.AppSettings package, first install that package if you haven't already done so:

Install-Package Serilog.Settings.AppSettings

Instead of configuring the logger in code, call ReadFrom.AppSettings():

var log = new LoggerConfiguration()
    .ReadFrom.AppSettings()
    .CreateLogger();

In your application's App.config or Web.config file, specify the console sink assembly under the <appSettings> node:

<configuration>
  <appSettings>
    <add key="serilog:using:Debug" value="Serilog.Sinks.Debug" />
    <add key="serilog:write-to:Debug" />

JSON appsettings.json configuration

To use the console 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": {
    "WriteTo": ["Debug"]
  }
}

Copyright © 2017 Serilog Contributors - Provided under the Apache License, Version 2.0.

Showing the top 20 packages that depend on Serilog.Sinks.Debug.

Packages Downloads
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
69
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
27
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
24
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
23
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
22
IppDotNetSdkForQuickBooksApiV3
The IPP .NET SDK for QuickBooks V3 is a set of .NET classes that make it easier to call QuickBooks APIs. This is the .Net Standard 2.0 version of the .Net SDK
21
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
21
IppDotNetSdkForQuickBooksApiV3
The IPP .NET SDK for QuickBooks V3 is a set of .NET classes that make it easier to call QuickBooks APIs. This is the .Net Standard 2.0 version of the .Net SDK
20
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
19
IppDotNetSdkForQuickBooksApiV3
The IPP .NET SDK for QuickBooks V3 is a set of .NET classes that make it easier to call QuickBooks APIs. This is the .Net Standard 2.0 version of the .Net SDK
19
IppDotNetSdkForQuickBooksApiV3
The IPP .NET SDK for QuickBooks V3 is a set of .NET classes that make it easier to call QuickBooks APIs. This is the .Net Standard 2.0 version of the .Net SDK
18
Serilog.AspNetCore
Serilog support for ASP.NET Core logging
18

.NET Framework 4.6.2

.NET Framework 4.7.1

.NET 6.0

.NET 8.0

.NET Standard 2.0

Version Downloads Last updated
3.0.0 74 06/14/2024
3.0.0-dev-00040 8 06/25/2026
2.0.0 11 02/21/2023
2.0.0-dev-00026 8 11/10/2025
1.0.2-dev-00023 10 06/14/2024
1.0.2-dev-00020 14 12/09/2024
1.0.2-dev-00018 12 10/30/2024
1.0.1 16 09/30/2021
1.0.1-dev-00015 10 06/01/2024
1.0.0 17 12/20/2024
1.0.0-dev-00009 10 06/11/2025
1.0.0-dev-00007 10 10/27/2025
1.0.0-dev-00004 8 12/20/2024
1.0.0-dev-00002 8 05/11/2025