tadpole/engine/pkg/slugger/README.md

875 B

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.