Serilog.Sinks.WPF 1.2.1

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 and Polyglot Notebooks. 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 Compatible and additional computed target framework versions.
.NET Framework net46 is compatible.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 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.2.1 3,592 5/28/2021
1.2.0 332 4/28/2021
1.1.0 470 9/21/2020
1.0.0 416 9/3/2020