tadpole/engine/pkg/slugger
Peterino 8c9c158415 moving everything from lib/ to pkg 2026-11-23 12:21:51 -07:00
..
src moving everything from lib/ to pkg 2026-11-23 12:21:51 -07:00
.gitignore moving everything from lib/ to pkg 2026-11-23 12:21:51 -07:00
README.md moving everything from lib/ to pkg 2026-11-23 12:21:51 -07:00
build.zig moving everything from lib/ to pkg 2026-11-23 12:21:51 -07:00
build.zig.zon moving everything from lib/ to pkg 2026-11-23 12:21:51 -07:00

README.md

slugger

My structured logging library. Goal here is to add a general purpose logging library that is good enough for all possible usecases from within the game engine.

Basic premise of operation: you log from any arbitrary thread and it goes to an in-memory log file format (currently it's just an arraylist, soon to be an in-memory db called LogMem)

StructuredLog is the runtime format optimized for immediately rendering the output.

rendering is easy while the program is still running because drain() sees a stream of StructuredLog s that it can call render() on

LogMem entries need to be elaborated into a StructuredLog stream with an associated StructuredLogRefContext in order to render into text, lots of rendering features are available with this library.

todo: generator style rendering, create a generator object which renders out sub chunks to writers.