Skip to content

z7workbench/loggi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

loggi - High-Performance Log Viewer

.NET Rust Avalonia Powered by Qwen-Code

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.

✨ Features

  • 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

πŸš€ Getting Started

Prerequisites

Building the Project

Windows

# 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

Linux/macOS

# 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 run

πŸ—οΈ Architecture

Project Structure

src/
β”œβ”€β”€ 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

Tech Stack

  • Backend (Rust):

    • memmap2: Efficient memory mapping for large file access
    • serde: JSON serialization for data exchange
    • regex: 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

πŸ› οΈ Usage

  1. Open a Log File: Click the open file button to select a log file
  2. Navigate: Use the virtualized scroll bar to quickly navigate through the log
  3. 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
  4. Jump to Results: Double-click a search result to highlight and navigate to that line

πŸ“ File Structure

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

πŸ’‘ Performance Highlights

  • 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

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

πŸ–₯️ A high-performance log viewer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published