NLog.Windows.Forms.Async
6.10.0
dotnet add package NLog.Windows.Forms.Async --version 6.10.0
NuGet\Install-Package NLog.Windows.Forms.Async -Version 6.10.0
<PackageReference Include="NLog.Windows.Forms.Async" Version="6.10.0" />
<PackageVersion Include="NLog.Windows.Forms.Async" Version="6.10.0" />
<PackageReference Include="NLog.Windows.Forms.Async" />
paket add NLog.Windows.Forms.Async --version 6.10.0
#r "nuget: NLog.Windows.Forms.Async, 6.10.0"
#:package NLog.Windows.Forms.Async@6.10.0
#addin nuget:?package=NLog.Windows.Forms.Async&version=6.10.0
#tool nuget:?package=NLog.Windows.Forms.Async&version=6.10.0
NLog.Windows.Forms
This package provides NLog Targets that redirect logging output to Windows Forms:
- RichTextBoxTarget
AsyncRichTextBoxTarget(batched background processing for RichTextBox updates)- MessageBoxTarget
- FormControlTarget
- ToolStripItemTarget
See list
Register Extension
Install the NLog.Windows.Forms NuGet package and register the extension-assembly.
NLog will only recognize the extensions when loading from NLog.config-file, by adding the extension to NLog.config-file:
<extensions>
<add assembly="NLog.Windows.Forms"/>
</extensions>
Alternative register from code using fluent configuration API:
NLog.LogManager.Setup().RegisterWindowsForms();
AsyncRichTextBoxTarget
AsyncRichTextBoxTarget extends RichTextBoxTarget and processes queued log events on a background thread.
It can reduce UI update overhead by batching messages before writing them to the target control.
Example (programmatic setup):
var richTextTarget = new NLog.Windows.Forms.AsyncRichTextBoxTarget
{
Name = "rtb",
FormName = "MainForm",
ControlName = "richTextBoxLog",
Layout = "${longdate}|${level:uppercase=true}|${message}",
Interval = 500
};
Intervalis the processing interval in milliseconds.- Use a smaller value for more immediate UI updates.
- Use a larger value to reduce update frequency under high log volume.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net6.0-windows7.0 is compatible. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net8.0-windows7.0 is compatible. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net10.0-windows7.0 is compatible. |
| .NET Core | netcoreapp3.1 is compatible. |
| .NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Changelog:
- Added NET10 targetframework