Serilog.Sinks.WinForms 2.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Serilog.Sinks.WinForms --version 2.2.1                
NuGet\Install-Package Serilog.Sinks.WinForms -Version 2.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.WinForms" Version="2.2.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Serilog.Sinks.WinForms --version 2.2.1                
#r "nuget: Serilog.Sinks.WinForms, 2.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.WinForms as a Cake Addin
#addin nuget:?package=Serilog.Sinks.WinForms&version=2.2.1

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

Serilog.Sinks.WinForms

Writes Serilog events to Windows Forms Application TextBox or Datagridview control from anywhere in your application.

To configure the sink in C# code, call WriteToSimpleTextBox() or WriteToJsonTextBox() or WriteToGridView() 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()
                        .WriteToSimpleTextBox()
                        .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();
Datagridview Log

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

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

Sample Code

Find the sample running application here

Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  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
2.4.3 6,962 9/2/2022
2.4.2 1,576 4/8/2022
2.4.1 843 4/8/2022 2.4.1 is deprecated because it is no longer maintained.
2.4.0 1,266 4/8/2022 2.4.0 is deprecated because it is no longer maintained.
2.3.1 3,521 5/27/2021
2.3.0 1,571 5/1/2021
2.2.6 1,644 3/2/2021
2.2.5 1,622 2/19/2021
2.2.4 762 2/18/2021
2.2.3 1,202 11/29/2020
2.2.2 852 11/18/2020
2.2.1 958 9/19/2020
2.2.0 904 9/12/2020
2.1.0 829 9/10/2020
2.0.0 878 9/3/2020
1.1.0 959 8/31/2020

Font and size can be configured now, packages updated to latest