A TUI (Terminal User Interface) application for viewing and filtering como-data-center log files with Helix-style keybindings.
- Unified Log View: Merge all log files chronologically with auto-detected timestamps
- Filters: Include/exclude filters with case-insensitive substring matching
- Search: Incremental search with
n/Nnavigation and match highlighting - Selection & Yank: Select lines with
xand copy to clipboard withy - Helix Keybindings: Modal editing with hjkl navigation and
:command mode - Generic Log Support: Works with any text log format (not just JSON)
- Async Loading: Efficient loading for large datasets
- Virtual Scrolling: Handle millions of lines with only visible lines rendered
- Horizontal Scroll: View wide log content with wrap mode toggle
- Configurable Log Coloring: Customize line colors via TOML config files
- Export: Save filtered results to file with
:writecommand
cd qlog
cargo build --releaseThe binary will be at target/release/qlog.
# Automatically find *.log files in current directory
./qlog
# Or specify specific log files
./qlog /path/to/*.logj/korArrow Up/Down- Scroll through logsh/lorArrow Left/Right- Horizontal scrollg- Go to topG- Go to bottomw- Toggle wrap mode:- Enter command mode/- Enter search moden- Next search matchN- Previous search matchx- Start/extend line selectiony- Yank (copy) selected lines to clipboardEsc- Clear selectionq- Quit application (or:q/:quitin command mode)
filter <text>- Add include filterfilter-out <text>- Add exclude filterfilter-clear- Clear all filterslist-filters- Show filter list viewwrite [filename]orw [filename]- Save filtered logs to filequitorq- Quit applicationEnter- Execute commandEsc- Cancel and return to normal modeBackspace- Delete character
j/korArrow Up/Down- Select filterd- Delete selected filterEnter/Esc/q- Return to normal mode
Enter- Execute searchEsc- Cancel and return to normal modeBackspace- Delete character
qlog supports include and exclude filters:
- Include filters: Lines must contain at least one include filter text (OR logic between multiple includes)
- Exclude filters: Lines containing any exclude filter text are hidden
- Filters are combined as: `(include1 OR include2) AND NOT (exclude1 OR exclude2)
Filter matching is case-insensitive substring search against the raw log line.
Add filters via command mode (:):
:filter <text>- Add include filter:filter-out <text>- Add exclude filter:filter-clear- Remove all filters:list-filters- View and manage active filters
Log lines can be colored based on pattern matching. Create a configuration file at:
./.qlog/qlog.toml(current directory) - takes precedence~/.qlog/qlog.toml(home directory) - fallback
[colors]
error = "red"
warn = "yellow"
success = "green"
"*TODO*" = "magenta"error- matches lines containing "error" (case-insensitive)*error- matches lines ending with "error"error*- matches lines starting with "error"*error*- matches lines containing "error"
First match wins based on config file order. Timestamps remain cyan regardless of line color.
Basic: red, green, blue, yellow, magenta, cyan, white, black, gray
Extended: dark_gray, light_red, light_green, light_blue, light_yellow, light_magenta, light_cyan
src/
├── main.rs # Entry point and CLI args
├── lib.rs # Library exports
├── app.rs # Application state and key handling
├── clipboard.rs # Clipboard integration for copy operations
├── config.rs # Log coloring configuration
├── model/
│ ├── log_entry.rs # Log entry (raw text + optional timestamp)
│ ├── filter.rs # FilterList with include/exclude logic
│ ├── timestamp.rs # Timestamp detection from log lines
│ ├── mmap_str.rs # Memory-mapped string wrapper
│ ├── line_info.rs # Line position tracking for log files
│ ├── log_storage.rs # Memory-mapped log storage with indexing
│ ├── visual_line_cache.rs # Visual line calculation caching
│ ├── selection.rs # Line selection state management
│ └── mod.rs # Model module exports
├── storage/
│ ├── loader.rs # Log file loading
│ └── mod.rs # Storage module exports
└── ui/
└── mod.rs # TUI rendering (filter bar, log list, status)
cargo testTests cover:
- Filter matching logic (include/exclude filters)
- Case-insensitive text matching
- Timestamp detection from various formats
- Log loading from files
- Memory-mapped string operations
- Visual line calculation caching
- Selection state management
- Configuration parsing
- Search matching with Boyer-Moore-Horspool algorithm
- Memory-mapped files for efficient reading
- Virtual scrolling renders only visible lines
- Async file loading keeps UI responsive
- Optimized filtering with Boyer-Moore-Horspool algorithm - 10-100x faster substring matching
- Zero-allocation, byte-level case-insensitive matching (ASCII-only)
- Early termination for AND-combined filter groups
- Optimized for 2.5GB+ datasets
MIT