A modern, blazing-fast log file viewer built with Tauri and Leptos
Features • Installation • Usage • Development • Architecture • License
Logarithm is a powerful desktop application designed for developers who need to quickly inspect, filter, and analyze log files. Built with modern web technologies and Rust, it offers exceptional performance and a beautiful, intuitive interface.
- 🚀 Blazing Fast: Native performance with Rust backend
- 🎨 Beautiful UI: Modern, clean interface with dark/light themes
- 🔍 Advanced Filtering: Level, search, datetime, line range, and severity filters
- 🤖 AI-Powered: Integrated AI assistant (Logan) for log analysis
- ⚡ Real-time: Instant filtering and search with fuzzy matching
- 🎯 Smart Parsing: Automatic detection of timestamps, levels, and messages
- 💾 Lightweight: Small footprint, minimal resource usage
- 🔒 Privacy-First: All processing happens locally on your machine
- Open and view multiple log files simultaneously
- Tab-based interface for easy switching between files
- Automatic parsing of common log formats
- Support for large files (10k+ lines)
- Drag-and-drop file opening
- Level Filtering: Filter by log level (TRACE, DEBUG, INFO, WARN, ERROR, FATAL)
- Custom Levels: Define your own custom level filters
- Search: Full-text search with multiple modes:
- Case-sensitive matching
- Fuzzy search
- Regex support
- Invert match
- Search in timestamps
- Date/Time Range: Filter logs by datetime range
- Line Range: Filter by specific line numbers
- Severity: Minimum severity level filtering
- Advanced Options: Hide lines without levels, inherit levels for continuation lines
- Syntax Highlighting: Color-coded log levels with badges
- Continuation Lines: Visual distinction for multi-line log entries
- Line Grouping: Automatic grouping of related log lines
- Focus Mode: Click to focus on specific log lines
- Multi-Select: Ctrl+Click to select multiple lines
- Context Menu: Right-click for quick actions
- Integrated AI Chat: Built-in AI assistant for log analysis
- Multiple Providers: Support for OpenAI, Anthropic, Google Gemini, and Groq
- Context Chips: Add specific log lines as context for AI queries
- File Mentions: Reference entire log files with @ mentions
- Smart Actions:
- Add to context: Include log lines in AI conversation
- Explain: Get AI explanation of specific log entries
- Copy: Copy log lines to clipboard
- Markdown Support: Rich formatting in AI responses
- Themes: Dark and light mode support
- Resizable Panels: Adjust filter panel and AI chat width
- Keyboard Shortcuts: Efficient keyboard navigation
- Persistent Settings: Remembers your preferences
- Node.js (v18 or higher)
- Rust (1.70 or higher)
- bun (recommended) or npm
-
Clone the repository
git clone https://github.com/mmycin/Logarithm.git cd Logarithm -
Install dependencies
bun install cargo install
-
Run in development mode
cargo tauri dev
-
Build for production
cargo tauri build
cargo tauri build --target x86_64-pc-windows-msvccargo tauri build --target x86_64-apple-darwin
# For Apple Silicon
cargo tauri build --target aarch64-apple-darwincargo tauri build --target x86_64-unknown-linux-gnu- File Menu: Click
File → Openor pressCtrl+O - Drag & Drop: Drag a
.logfile into the window - Recent Files: Access recently opened files from the File menu
- Click on level badges (ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL)
- Use "Custom" to define comma-separated custom levels
- Toggle "Inherit" to apply levels to continuation lines
- Enter search query in the search box
- Toggle options:
- Aa: Case-sensitive matching
- .*: Fuzzy search
- Re: Regex mode
- ¬: Invert match
- Enable "Include timestamp" to search in datetime fields
- Click "Date & Time" section
- Set "From" and "To" datetime values
- Click "Clear date range" to reset
- Enter start line in "From" field
- Enter end line in "To" field
- Leave empty for unbounded range
-
Setup
- Click the AI chat icon in the bottom bar
- Select your AI provider (OpenAI, Anthropic, Gemini, Groq)
- Enter your API key
- Choose a model (or use default)
- Click "Start Chatting"
-
Adding Context
- Right-click on a log line → "Add to Logan context"
- Select multiple lines (Ctrl+Click) → Right-click → "Add to Logan context"
- Context chips appear in the input area
-
Mentioning Files
- Type
@in the chat input - Select a file from the autocomplete list
- The entire file content will be included as context
- Type
-
Quick Actions
- Right-click on a log line → "Explain with Logan AI"
- Logan will automatically analyze the log entry
| Shortcut | Action |
|---|---|
Ctrl+O |
Open log file |
Ctrl+W |
Close active tab |
Ctrl+F |
Focus search box |
Ctrl+T |
Toggle theme (dark/light) |
Ctrl+B |
Toggle filter panel |
Ctrl+L |
Toggle AI chat panel |
Ctrl+/ |
Show keyboard shortcuts |
Ctrl+Click |
Multi-select log lines |
Logarithm/
├── src/ # Frontend (Leptos/Rust)
│ ├── ai/ # AI assistant module
│ │ ├── components/ # UI components
│ │ ├── handlers/ # Event handlers
│ │ ├── state/ # State management
│ │ └── types/ # Type definitions
│ ├── components/ # Core UI components
│ │ ├── bottom_bar.rs
│ │ ├── file_bar.rs
│ │ ├── filter_panel.rs
│ │ ├── filter_section.rs
│ │ ├── filter_tab.rs
│ │ ├── severity.rs
│ │ └── title_bar.rs
│ ├── filters/ # Filter components
│ ├── markdown/ # Markdown rendering
│ │ ├── colors.rs
│ │ ├── escape.rs
│ │ ├── inline.rs
│ │ └── parser.rs
│ ├── shared/ # Shared utilities
│ │ ├── constants/ # Color tokens
│ │ ├── storage/ # LocalStorage helpers
│ │ ├── types/ # Shared types
│ │ └── utils/ # Utility functions
│ ├── viewer/ # Log viewer module
│ │ ├── components/ # Viewer components
│ │ ├── filters/ # Filter logic
│ │ ├── rendering/ # Rendering utilities
│ │ └── types/ # Viewer types
│ ├── app.rs # Main app component
│ └── main.rs # Entry point
├── src-tauri/ # Backend (Tauri/Rust)
│ └── src/
│ ├── ai/ # AI integration
│ │ ├── gemini.rs # Google Gemini
│ │ └── openai.rs # OpenAI
│ ├── commands/ # Tauri commands
│ │ ├── file_commands.rs # File operations
│ │ └── log_commands.rs # Log parsing/filtering
│ ├── types/ # Type definitions
│ │ ├── ai_types.rs
│ │ └── log_types.rs
│ ├── lib.rs # Library entry
│ └── main.rs # Binary entry
├── public/ # Static assets
├── index.html # HTML template
├── package.json # Node dependencies
├── Cargo.toml # Rust dependencies
└── README.md # This file
- Leptos: Reactive UI framework for Rust
- WebAssembly: Compiled Rust running in the browser
- Tailwind CSS: Utility-first CSS framework
- Fira Code: Monospace font for log display
- Tauri: Desktop application framework
- Rust: Systems programming language
- Tokio: Async runtime
- Reqwest: HTTP client for AI APIs
- Serde: Serialization/deserialization
-
Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Install Node.js and bun
# Install Node.js from https://nodejs.org/ npm install -g bun -
Install Tauri CLI
cargo install tauri-cli
-
Clone and build
git clone https://github.com/mmycin/Logarithm.git cd Logarithm bun install bun tauri build
# Run in development mode with hot reload
bun tauri dev
# Build for production
bun tauri build
# Run frontend only (for UI development)
trunk serve
# Check Rust code (frontend)
cargo check
# Check Rust code (backend)
cargo check --manifest-path src-tauri/Cargo.toml
# Format code
cargo fmt --all
# Run linter
cargo clippy --all-targets --all-featuresLogarithm uses a modular, component-based architecture with clear separation of concerns:
- Types: Data structures and type definitions
- State: State management with Leptos signals
- Handlers: Event handlers and business logic
- Components: UI components (presentational)
- Single Responsibility: Each module has one clear purpose
- DRY (Don't Repeat Yourself): No code duplication
- KISS (Keep It Simple, Stupid): Simple, clear logic
- Reactive Programming: Leptos signals for state management
- Type Safety: Strong typing throughout
The Tauri backend is organized into focused modules:
parse_log: Parse log file text into structured entriesfilter_entries: Apply filters to log entriesopen_url: Open URLs in system browserread_file_by_path: Read file contentsai_chat: Send messages to AI providers
- Modular provider system (Gemini, OpenAI)
- 30-second timeout protection
- Automatic retry logic
- Error handling and reporting
User Input → Leptos Component → Signal Update → Reactive Re-render
↓
Tauri Command (if needed)
↓
Rust Backend Processing
↓
Return Result
↓
Update Signal → Re-render
- Get API key from https://platform.openai.com/api-keys
- Select provider: "OpenAI"
- Enter API key
- Choose model (default: gpt-4o-mini)
- Get API key from https://makersuite.google.com/app/apikey
- Select provider: "Gemini"
- Enter API key
- Choose model (default: gemini-1.5-flash)
Settings are stored locally using browser LocalStorage:
- AI provider and model preferences
- API keys (encrypted in browser storage)
- Theme preference
- Panel sizes
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow Rust standard formatting (
cargo fmt) - Run clippy and fix warnings (
cargo clippy) - Write clear commit messages
- Add tests for new features
- Update documentation
Please use GitHub Issues to report bugs or request features. Include:
- Clear description of the issue
- Steps to reproduce
- Expected vs actual behavior
- Screenshots (if applicable)
- System information (OS, version)
- Export Functionality: Export filtered logs to file
- Log Streaming: Real-time log file monitoring
- Custom Parsers: User-defined log format parsers
- Bookmarks: Save and recall filter configurations
- Search History: Recent search queries
- Performance Metrics: Display parsing and filtering stats
- Plugin System: Extensible architecture for custom features
- Cloud Sync: Sync settings across devices
- Collaborative Features: Share log analysis with team
- Advanced AI Features:
- Pattern detection
- Anomaly detection
- Automated insights
- Log summarization
A: Logarithm automatically detects common log formats with timestamps and log levels. It works with most standard formats including:
- ISO 8601 timestamps
- Space-separated fields
- Common log levels (TRACE, DEBUG, INFO, WARN, ERROR, FATAL)
A: Logarithm is optimized for files with 10,000+ lines. Performance depends on your system, but it handles most typical log files efficiently.
A: No. All log parsing and filtering happens locally on your machine. Only AI chat messages are sent to the selected AI provider (OpenAI, Anthropic, etc.) when you explicitly use the AI features.
A: Yes! All core features (log viewing, filtering, searching) work without AI. The AI assistant is an optional enhancement.
A: Download the latest release from GitHub and install it. Your settings will be preserved.
A: Not yet, but it's on the roadmap! Currently, you need to reload the file to see new entries.
Problem: cargo build fails with dependency errors
Solution: Update Rust toolchain: rustup update
Problem: bun install fails
Solution: Clear cache: bun store prune then retry
Problem: Tauri build fails on Windows
Solution: Install Visual Studio Build Tools with C++ support
Problem: Log file won't open
Solution: Ensure file has .log extension and is readable
Problem: AI chat not working
Solution: Verify API key is correct and you have internet connection
Problem: Filters not applying
Solution: Check filter syntax and ensure "Clear all" wasn't clicked
- Large Files: For very large files (100k+ lines), use filters to reduce visible entries
- Search: Use specific search terms rather than broad queries
- AI Context: Limit context chips to relevant lines (5-10 max)
- Multiple Files: Close unused tabs to free memory
- All log processing happens locally
- API keys stored in browser LocalStorage (not transmitted)
- No telemetry or analytics
- No external dependencies for core features
- Keys are stored locally only
- Never logged or transmitted except to chosen AI provider
- Use environment variables for development
- Rotate keys regularly
Built with amazing open-source technologies:
- Tauri - Desktop application framework
- Leptos - Reactive UI framework
- Rust - Systems programming language
- Trunk - WASM build tool
- Tailwind CSS - CSS framework
Special thanks to the Rust and Tauri communities for their excellent documentation and support.
- Author: mmycin
- Repository: github.com/mmycin/Logarithm
- Issues: github.com/mmycin/Logarithm/issues
