Serilog.Sinks.FastConsole 2.4.0

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

// Install Serilog.Sinks.FastConsole as a Cake Tool
#tool nuget:?package=Serilog.Sinks.FastConsole&version=2.4.0

Serilog.Sinks.FastConsole

Serilog sink that writes to console with high-performance non-blocking output. Supports plaintext and JSON output but does not support themes and colors.

This sink uses a background channel with a single reader, efficient text buffer, and asynchronous writes to remove all blocking and lock contention to the console output stream. It also implements IDiposable so calling Log.CloseAndFlush() will ensure all lines are flushed.

Recommended for high-volume logging where console output is collected or redirected to another system, for example this library was originally created for large application clusters running in Kubernetes and logging hundreds of JSON objects every second.

  • Built for net6.0, netstandard2.1, netstandard2.0
  • Release notes here: CHANGELOG.md

Getting started

Install package from Nuget:
dotnet add package Serilog.Sinks.FastConsole
Configure Logger (using code):
var config = new FastConsoleSinkOptions { UseJson = true };
Log.Logger = new LoggerConfiguration().WriteTo.FastConsole(config).CreateLogger();

Sink Options

Name Default Description
UseJson true Enable to write log events as a JSON object with { timestamp, level, message, properties } structure. Provide an ITextFormatter implementation instead to customize the output completely.
QueueLimit null Set max limit for the number of log entries queued in memory. Used to provide backpressure and avoid out-of-memory issues for high-volume logging.
BlockWhenFull false Set behavior when queue is full. When true this will block the thread until logs are output to console. Only applicable if QueueLimit is set.
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48 net481
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Serilog.Sinks.FastConsole:

Package Downloads
DotCart.Drivers.Serilog

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.4.0 286 3/26/2023
2.3.0 9,462 1/9/2023
2.2.0 18,500 10/17/2022
2.1.0 57,154 6/12/2022
2.0.0 17,899 3/9/2022
1.6.0 747 2/20/2022
1.5.0 127,508 6/27/2021
1.4.1 8,628 4/25/2021
1.4.0 355 4/25/2021
1.3.2 97,391 6/9/2020
1.3.1 7,876 10/7/2019
1.3.0 1,013 7/18/2019
1.2.0 407 7/18/2019
1.1.0 402 7/18/2019
1.0.0 419 7/18/2019