A CLI log viewer that scales the output based on severity
Find a file
Hariss Ali Gills 80394ae1b9
fix: Add rust doc comments and simplify enum and struct design
Refactored the core log-level logic to be more idiomatic and maintainable.
Replaced complex enum variants with a simple unit enum and a mapping
function to consolidate formatting logic.
2026-04-16 23:08:18 +01:00
.github/workflows fix(ci): Add correct binary name 2026-01-07 15:03:07 +03:00
assets fix(assets): Add better image 2026-01-08 12:52:29 +03:00
src fix: Add rust doc comments and simplify enum and struct design 2026-04-16 23:08:18 +01:00
.gitignore feat: add support for colors and stdin 2026-02-01 22:19:07 +00:00
Cargo.lock feat: add support for colors and stdin 2026-02-01 22:19:07 +00:00
Cargo.toml feat: add support for colors and stdin 2026-02-01 22:19:07 +00:00
mise.toml init(mise, cargo): Add basic CLI parsing 2026-01-03 21:26:00 +03:00
README.md fix: Add rust doc comments and simplify enum and struct design 2026-04-16 23:08:18 +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.


Usage

kitlog --help
Usage: kitlog <PATH>

Arguments:
  <PATH>  Path to a log file

Options:
  -h, --help     Print help
  -V, --version  Print version

Future Plans

  • Add scaling values as arguments
  • Possible config file?
  • Multilang support?