loggi is a cross-platform, high-performance log file viewer built with a Rust core and Avalonia UI. It efficiently handles large log files using memory mapping technology and provides fast search capabilities.
- High Performance: Memory-mapped file access enables fast loading of large log files
- Virtual Scrolling: Smooth navigation through millions of log lines
- Text Search: Fast full-text search with case-sensitive option
- Regex Search: Advanced pattern matching for complex searches
- Cross-Platform: Runs on Windows, Linux, and macOS
- Modern UI: Built with Avalonia UI for native look and feel
- .NET 9.0+
- Rust 1.70+
- Avalonia 11.0+
# Clone the repository
git clone https://github.com/z7workbench/loggi.git
cd loggi
# Build the Rust core library
.\scripts\build-rust.ps1
# Build and run the application
cd src\avalonia
dotnet run# Clone the repository
git clone https://github.com/z7workbench/loggi.git
cd loggi
# Build the Rust core library
./scripts/build-rust.sh
# Build and run the application
cd src/avalonia
dotnet runsrc/
βββ rust/ # Rust core library (loggi_core)
β βββ Cargo.toml # Rust dependencies and build config
β βββ src/
β βββ lib.rs # Memory mapping, search algorithms, and FFI
βββ avalonia/ # Avalonia UI application
β βββ Loggi.csproj # .NET project file
β βββ Program.cs # Application entry point
β βββ App.axaml # Application definition
β βββ Views/ # UI views and controls
β βββ ViewModels/ # MVVM view models
β βββ Services/ # Service layer (including Rust interop)
β βββ Converters/ # Value converters for UI
βββ scripts/ # Build and utility scripts
βββ build-rust.sh # Unix build script
βββ build-rust.ps1 # Windows PowerShell build script
-
Backend (Rust):
memmap2: Efficient memory mapping for large file accessserde: JSON serialization for data exchangeregex: Advanced pattern matching for regex searches- FFI: C ABI functions for interoperability with C#
-
Frontend (C# Avalonia):
- Avalonia 11+: Cross-platform XAML-based UI framework
- CommunityToolkit.Mvvm: MVVM pattern implementation
- ItemsRepeater: Virtualized list controls for performance
- Open a Log File: Click the open file button to select a log file
- Navigate: Use the virtualized scroll bar to quickly navigate through the log
- Search:
- Text search: Enter your search term in the search box
- Case-sensitive option: Toggle for case-sensitive matching
- Regex search: Use regex patterns for advanced searches
- Jump to Results: Double-click a search result to highlight and navigate to that line
The project is organized as a hybrid application with separate Rust and C# components:
- Rust (
src/rust): Handles file I/O, memory mapping, and search operations - Avalonia UI (
src/avalonia): Provides the user interface and application logic - Build Scripts (
scripts/): Automate the build process across platforms
- Memory Mapping: Large files are accessed via memory mapping instead of loading entirely into RAM
- Efficient Searching: Rust backend provides fast full-text and regex search capabilities
- Virtualization: UI only renders visible log lines for smooth scrolling
- Caching: Recently accessed file mapping is cached for improved performance
This project is licensed under the MIT License - see the LICENSE file for details.