尚未检测到更新。GitHub 发布版本后会显示在这里。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗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.7.2 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 source
Avalonedit is fast, the view is virtualized. It can easily handle thousands of lines.
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
public void AppendWithBrush(SolidColorBrush br, string s)
and similar functions on the AvalonLog instance.
[!CAUTION] When used from C# add a reference to FSharp.Core 6.0.7 or higher.
AvalonLog is available as NuGet package.
Just run dotnet build
Run dotnet test. The tests in Tests run on .NET Framework 4.7.2 and .NET 8, they need Windows (WPF).
see CHANGELOG.md
Logo by LovePik