Structured, coloured, column-aligned logging for Python that drops into a project with almost no configuration.
Overview
A small logging library that produces clean, coloured, column-aligned log lines. It writes ANSI colour codes directly and batches file writes on a background thread, so heavy logging stays cheap. Published on PyPI, MIT licensed, fully typed.
The v2.0 release was a reliability and correctness overhaul, centred on one guarantee: logs survive shutdown.
Design decisions 05
ANSI escape sequences are written directly instead of depending on the rich library — the v1.1.0 changelog records this cutting a log call from about 50 ms to about 0.05 ms, roughly a thousandfold, and it is the library’s defining choice.
File writes are batched on a background thread that flushes a configurable number of times per second, so high-volume logging never blocks on disk IO; v1.2 made it thread-safe with locking at a documented, accepted throughput cost.
v2.0 guarantees logs survive shutdown: the writer flushes on interpreter exit via atexit, CRITICAL logs flush immediately, and close() flushes on demand — closing a real gap where buffered logs were lost on crash or exit.
Resolved caller file paths are cached, so the auto-filename feature — which walks the stack to label each line with file:line — does not re-walk the directory tree on every call.
Packaging migrated from the removed distutils to a PEP 621 pyproject with a py.typed marker, so the library keeps installing on modern Python and its type hints reach consumers.