larzlog
Structured logging for real apps.
When your app runs somewhere you can't see, logs are your eyes. larzlog is a small structured logger - filterable levels, key=value context fields, text or JSON output, and bind() to attach context like a request id to every line. Injectable output and clock make it easy to test.
larzscript pkg install log
What you get
- Levels with filtering
- key=value context fields
- Text or JSON output
- bind() request context
Try it
import "log" as log
log.set_level("info")
log.info("request done", {"status": 200, "ms": 42})
let rlog = log.bind({"request_id": "abc123"})
log.rinfo(rlog, "handling request")Output
[01:59:22] INFO request done status=200 ms=42 [01:59:22] INFO handling request request_id=abc123
Why it's in the Larz Stack
larzlog is a real Larzscript package (larzscript pkg install log) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.