A CLI log viewer that scales the output based on severity
Find a file
2026-05-26 23:12:46 +01:00
.github/workflows fix(ci): Add correct binary name 2026-01-07 15:03:07 +03:00
assets fix: Add updated preview image 2026-05-26 23:12:46 +01:00
src feat: add confy based config loading 2026-05-26 18:59:22 +01:00
.gitignore feat: add support for colors and stdin 2026-02-01 22:19:07 +00:00
Cargo.lock feat: add confy based config loading 2026-05-26 18:59:22 +01:00
Cargo.toml feat: add confy based config loading 2026-05-26 18:59:22 +01:00
mise.toml init(mise, cargo): Add basic CLI parsing 2026-01-03 21:26:00 +03:00
README.md fix: Remove scaling range in README 2026-05-26 19:35:46 +01:00

kitlog

kitlog

A CLI log viewer that renders that scales the output based on severity.

Exact appearance depends on your default font size and Kitty configuration.

Overview

We all like headers when rendering markdown. This project explores whether visual hierarchy belongs and to viewing logs.

By using Kittys OSC 66 text sizing protocol, kitlog turns plain terminal output into something closer to a semantic canvas. It's all still text, but much harder to miss or ignore when things ultimately go wrong.

This makes logs much easier to scan…and usually much more annoying, because once errors or warnings start ranting and raving, they dominate your screen and your attention.

Note

This only works with any terminal emulators that support the text sizing protocol, which at the moment (I think) is only kitty.


Supported Log Levels

The parser detects log levels case-insensitively anywhere in a line:

Level Keyword Scale
Error error 5
Warn warn 4
Info info 3
Debug debug 2
Trace trace 1

The higher the scaling the larger the text renders.


How it Works

  1. Reads logs line-by-line (streaming, no buffering the whole file)

  2. Uses a compiled regex to detect log level keywords

  3. Splits each matching line into:

    • Header (timestamp / prefix)
    • Message body
  4. Emits Kitty OSC 66 escape sequences to scale the output

Lines without a recognized log level pass through unchanged.


Configuration

kitlog can be configured via a TOML config file. By default it looks in the standard config directory for your OS (e.g. ~/.config/kitlog/config.toml on Linux). Use -c, --config <PATH> to specify a custom path.

Default Config

[levels.error]
scaling = 5
color = "1;31"
keyword = "error"

[levels.warn]
scaling = 4
color = "1;33"
keyword = "warn"

[levels.info]
scaling = 3
color = "1;34"
keyword = "info"

[levels.debug]
scaling = 2
color = "1;32"
keyword = "debug"

[levels.trace]
scaling = 1
color = "1;30"
keyword = "trace"

Each level has:

  • scaling — text size multiplier
  • color — ANSI color code (e.g. "1;31" for bold red)
  • keyword — the case-insensitive keyword detected in log lines

Usage

kitlog --help
A utility to parse and visually format logs

Usage: kitlog [OPTIONS] [PATH]

Arguments:
  [PATH]  Path to a log file [default: -]

Options:
  -c, --config <CONFIG>  Optional Path to config file
  -h, --help             Print help
  -V, --version          Print version