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
<PackageReference Include="Serilog.Sinks.WPF" Version="1.2.1" />
paket add Serilog.Sinks.WPF --version 1.2.1
#r "nuget: Serilog.Sinks.WPF, 1.2.1"
// 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 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. |
-
- Serilog (>= 2.10.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Read Docs at https://github.com/umairsyed613/Serilog.Sinks.WPF