Reusable Avalonia log viewer control with filtering for .NET applications. Built with SukiUI and Material.Icons.
Cross-platform, trimmable and AOT/NativeAOT compatible.
⭐ Please star this project if you like it. ⭐
| Package | NuGet | Description |
|---|---|---|
| Bia.LogViewer.Core | Core abstractions: LogModel, ILogEntrySource, IClipboardService |
|
| Bia.LogViewer.Avalonia | Avalonia UserControl + LogViewerViewModel with filtering UI |
All packages are cross-platform, trimmable and AOT/NativeAOT compatible.
- Log level filtering — toggle Info, Warning, Error, Critical independently via bitmask
- Auto-scroll — automatically scrolls to the latest log entry
- Copy on select — optionally copies selected log message to clipboard
- Per-level counters — real-time count badges for each severity level
- Observable source — uses
ObservableCollectionsfor high-performance reactive updates
// Provide log entries from your logging pipeline
public class MyLogSource : ILogEntrySource
{
public IReadOnlyObservableList<LogModel>? Entries { get; }
}
// Platform clipboard integration
public class MyClipboard : IClipboardService
{
public async Task CopyToClipboardAsync(string? text)
{
// Use Avalonia's clipboard API
}
}var vm = new LogViewerViewModel(logSource, clipboardService);<logViewer:LogViewerControl DataContext="{Binding LogViewerVm}" />dotnet tool restore
dotnet build -c Release
dotnet test
dotnet csharpier format .
dotnet format style
dotnet format analyzers