merton.logging

Structured logging wiring for merton.

The library uses structlog. By default it emits at WARNING and writes human-readable output to stderr when run interactively, JSON otherwise. Applications can configure logging themselves; we never touch the stdlib root logger except via the user-facing enable() helper.

Functions

get_logger(→ structlog.stdlib.BoundLogger)

Return a structlog bound logger named name (or the module's name).

enable(→ None)

Wire up a sensible default logging configuration.

Module Contents

merton.logging.get_logger(name: str | None = None) structlog.stdlib.BoundLogger[source]

Return a structlog bound logger named name (or the module’s name).

merton.logging.enable(level: str | int = 'INFO') None[source]

Wire up a sensible default logging configuration.

Convenience for interactive use; libraries should not call this from their own __init__ modules.