AvalonLog 0.22.0
dotnet add package AvalonLog --version 0.22.0
NuGet\Install-Package AvalonLog -Version 0.22.0
<PackageReference Include="AvalonLog" Version="0.22.0" />
<PackageVersion Include="AvalonLog" Version="0.22.0" />
<PackageReference Include="AvalonLog" />
paket add AvalonLog --version 0.22.0
#r "nuget: AvalonLog, 0.22.0"
#:package AvalonLog@0.22.0
#addin nuget:?package=AvalonLog&version=0.22.0
#tool nuget:?package=AvalonLog&version=0.22.0

AvalonLog
AvalonLog is a fast and thread-safe WPF text log viewer for colored text. Including F# printf formatting. Based on AvalonEditB. Works on .NET Framework 4.8 and .NET 7.0+
Thread-safe means that it can be called from any thread. A print call never waits for the UI thread.
Fast means
it buffers repeated print calls and updates the view at most 20 times per second (see
PrintInterval). see sourceAvalonedit is fast, the view is virtualized. It can easily handle thousands of lines.
Use with F#
Here an short example for F# interactive in .NET Framework. (for net5 or higher you would have to use it in a project)
#r "PresentationCore"
#r "PresentationFramework"
#r "WindowsBase"
#r "nuget: AvalonLog"
open System.Windows
let log = new AvalonLog.AvalonLog() // The main class wrapping an Avalonedit TextEditor as append only log.
// create some printing functions by partial application:
let red = log.printfColor 255 0 0 // without newline
let blue = log.printfnColor 0 0 255 // with newline
let green = log.printfnColor 0 155 0 // with newline
// print to log using F# printf formatting
red "Hello, "
blue "World!"
red "The answer"
green " is %d." (40 + 2)
Application().Run(Window(Content=log)) // show WPF window
this will produce

Use in C#
public void AppendWithBrush(SolidColorBrush br, string s)
and similar functions on the AvalonLog instance.
When used from C# add a reference to FSharp.Core 6.0.7 or higher.
Full API Documentation
Download
AvalonLog is available as NuGet package.
How to build
Just run dotnet build
How to test
Run dotnet test. The tests in Tests run on .NET Framework 4.8 and .NET 8, they need Windows (WPF).
Changelog
see CHANGELOG.md
License
Logo by LovePik
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. |
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- AvalonEditB (>= 2.6.1)
-
net8.0-windows7.0
- AvalonEditB (>= 2.6.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on AvalonLog:
| Package | Downloads |
|---|---|
|
Fesh
A hostable fsharp scripting editor for Windows based on Avalonedit |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 0.22.0 | 94 | 11/23/2026 | |
| 0.21.0 | 331 | 10/10/2026 | |
| 0.20.0 | 5,196 | 3/19/2025 | |
| 0.19.0 | 429 | 3/18/2025 | |
| 0.18.0 | 652 | 2/15/2025 | |
| 0.17.0 | 1,078 | 11/18/2024 | |
| 0.16.0 | 374 | 11/6/2024 | |
| 0.15.8 | 325 | 11/3/2024 | |
| 0.15.0 | 298 | 11/3/2024 | |
| 0.14.0 | 395 | 9/11/2024 | |
| 0.13.0 | 347 | 6/10/2024 | |
| 0.12.0 | 505 | 10/29/2023 | |
| 0.11.0 | 365 | 9/10/2023 | |
| 0.10.0 | 362 | 7/27/2023 | |
| 0.9.3 | 363 | 5/29/2023 | |
| 0.9.2 | 475 | 5/29/2023 | |
| 0.9.1 | 405 | 4/29/2023 | |
| 0.9.0 | 393 | 4/23/2023 | |
| 0.8.3 | 544 | 1/8/2023 | |
| 0.8.2 | 514 | 12/17/2022 |
### Changed
- Update to AvalonEditB 2.6.1
- Target net48 instead of net472
- Compile against FSharp.Core 6.0.7 (0.21.0 was accidentally compiled against FSharp.Core 10.1), so it works with FSharp.Core 6.0.7 and newer. FSharp.Core is still not a package dependency