Serilog.Sinks.WinForms 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Serilog.Sinks.WinForms --version 1.1.0
                    
NuGet\Install-Package Serilog.Sinks.WinForms -Version 1.1.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.WinForms" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Serilog.Sinks.WinForms" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Serilog.Sinks.WinForms" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Serilog.Sinks.WinForms --version 1.1.0
                    
#r "nuget: Serilog.Sinks.WinForms, 1.1.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.
#:package Serilog.Sinks.WinForms@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Serilog.Sinks.WinForms&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Serilog.Sinks.WinForms&version=1.1.0
                    
Install as a Cake Tool

Serilog.Sinks.WinForms

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

Getting started

Install the Serilog.Sinks.WinForms package from NuGet:

Install-Package Serilog.Sinks.WinForms

To configure the sink in C# code, call WriteTo.Sink() during logger configuration:

Simple Text Formatted Log
Log.Logger = new LoggerConfiguration()
                        .WriteTo.Sink(WindFormsSink.SimpleTextBoxSink)
                        .CreateLogger();
Json Formatted Log
Log.Logger = new LoggerConfiguration()
                        .WriteTo.Sink(WindFormsSink.JsonTextBoxSink)
                        .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.5.0 591 1/9/2025
2.4.3 8,353 9/2/2022
2.4.2 1,709 4/8/2022
2.4.1 944 4/8/2022 2.4.1 is deprecated because it is no longer maintained.
2.4.0 1,442 4/8/2022 2.4.0 is deprecated because it is no longer maintained.
2.3.1 3,629 5/27/2021
2.3.0 1,664 5/1/2021
2.2.6 2,169 3/2/2021
2.2.5 1,688 2/19/2021
2.2.4 824 2/18/2021
2.2.3 1,272 11/29/2020
2.2.2 920 11/18/2020
2.2.1 1,026 9/19/2020
2.2.0 976 9/12/2020
2.1.0 896 9/10/2020
2.0.0 960 9/3/2020
1.1.0 1,032 8/31/2020

Writes Serilog events to Winforms TextBox control