Commit Graph
5 Commits
Author SHA1 Message Date
Leo Vasanko 6eb9087863 Add logemit event callbacks and kanta.tty terminal formatting
All change-related output (transactions, bootstrap, migrations) is now
described by a mutable LogEvent carrying full state plus the preferred
logger and level, and dispatched through emit_event. @kanta.logemit
callbacks receive the event and decide what is logged where: falsy return
marks it handled, truthy passes it (possibly modified) down the chain,
with default_emit - Kanta's own formatting, now just another emitter - as
the fallback. Pretty header and diff lines are lazy event properties.

New kanta.tty module: Line builder (call to append content, .colorname
arms a palette color for the next call with automatic folded reset,
width/align padding), a mutable Colors palette storing bare SGR params
(0 clears, sequential last-wins stacking), and strip_ansi/displaywidth/pad
helpers that count wide chars and emoji correctly.
2026-08-07 05:11:54 +00:00
Leo Vasanko f4e0c66907 Tests for rich logging, apply ruff formatting 2026-08-06 23:06:24 +00:00
Leo Vasanko 1cda44f328 Only Kanta exported at root, others available from submodules. 2026-06-13 21:26:35 +00:00
Leo Vasanko 384b4fba4f Improved log formatting support by @kanta.logfmt, which replaces old resolver and user_display arguments (breaking change). 2026-06-13 21:22:05 +00:00
Leo Vasanko afebad72df Initial commit 2026-06-12 19:18:15 +00:00