Skip to main content

resq-logs

Version: v0.1.16 · License: Apache-2.0 · Crate: crates.io · API docs: docs.rs
Multi-source log aggregator and viewer for ResQ services

Overview

Crates.io License Multi-source log aggregator and real-time stream viewer for ResQ services. Streams logs from Docker Compose containers or local files into a searchable, filterable Ratatui TUI with a 10,000-line ring buffer, color-coded log levels, and deterministic per-service coloring.

Architecture

Installation

CLI Arguments

Usage Examples

Log Format Support

The parser (parser.rs) attempts each format in order and uses the first successful match:

JSON Field Aliases

The JSON parser accepts multiple field names for interoperability:

Level Recognition

The parser recognizes these level keywords (case-insensitive):

Log Sources

Docker (--source docker)

Runs docker compose logs -f --no-color --tail 200 from the infra/docker/ directory relative to the project root. A background thread reads stdout line-by-line through a BufReader and sends parsed entries over an unbounded mpsc channel.
  • Requires a running Docker Compose stack
  • Strips resq- prefix from container names automatically
  • Optional --service flag passes the service name to Docker for server-side filtering

File (--source file)

Opens and reads a local log file to completion, parsing each line. A background thread handles the I/O.

Keybindings

TUI Layout

Configuration

Buffer Size

The ring buffer holds a maximum of 10,000 log entries (MAX_LOG_LINES). When full, the oldest entry is dropped as each new entry arrives. Up to 256 entries are ingested per render frame (MAX_INGEST_PER_FRAME) to prevent UI stalls during high-throughput bursts.

Project Root Detection

The Docker source resolves the project root by navigating two levels up from the current working directory (ancestors().nth(2)). The compose file is expected at <project_root>/infra/docker/docker-compose.yml.

Environment Variables

This tool does not currently read environment variables for configuration. All settings are passed via CLI flags.

License

Licensed under the Apache License, Version 2.0. See LICENSE for details.