Serilog.Sinks.WPF 1.2.1

.NET Framework 4.6
dotnet add package Serilog.Sinks.WPF --version 1.2.1
NuGet\Install-Package Serilog.Sinks.WPF -Version 1.2.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.WPF" Version="1.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Serilog.Sinks.WPF --version 1.2.1
#r "nuget: Serilog.Sinks.WPF, 1.2.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Serilog.Sinks.WPF as a Cake Addin
#addin nuget:?package=Serilog.Sinks.WPF&version=1.2.1

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

Writes Serilog events to WPF TextBox control from anywhere in your application.

Getting started

Install the Serilog.Sinks.WPF package from NuGet:

Install-Package Serilog.Sinks.WPF

To configure the sink in C# code, call WriteToSimpleAndRichTextBox() or WriteToJsonTextBox() during logger configuration:

Simple Text Formatted Log

SimpleLogTextBox can be used from visual studio toolbox once the package is added to the project.

Log.Logger = new LoggerConfiguration()
                        .WriteToSimpleAndRichTextBox()
                        .CreateLogger();

SimpleLogTextBox or RichTextBoxLogControl with custom MessageTemplate. WriteToSimpleAndRichTextBox accepts ITextFormatter

Log.Logger = new LoggerConfiguration()
                        .WriteToSimpleAndRichTextBox(new MessageTemplateTextFormatter("{Timestamp} [{Level}] {Message} {Exception}"))
                        .CreateLogger();
Json Formatted Log

JsonLogTextBox can be used from visual studio toolbox once the package is added to the project.

Log.Logger = new LoggerConfiguration()
                        .WriteToJsonTextBox()
                        .CreateLogger();
Product Versions
.NET Framework net46 net461 net462 net463 net47 net471 net472 net48 net481
Compatible target framework(s)
Additional computed target framework(s)
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.2.1 2,939 5/28/2021
1.2.0 248 4/28/2021
1.1.0 372 9/21/2020
1.0.0 325 9/3/2020