Skip to content

Home

Logo.png

LogSpark is a configuration and integration layer over Python's standard logging module.

It does not replace stdlib logging. It does not introduce a new logging API. If you know stdlib, you already know how to use LogSpark's components. What LogSpark adds is lifecycle enforcement, environment-aware policy, and a corrected set of defaults that stdlib leaves to the user.


What problem does it solve?

Python's logging module is reliable and well-designed, but it leaves too many operational decisions implicit:

  • Logging works before anyone has configured it, silently
  • Any module anywhere can mutate the root logger
  • Configuration order matters and is never enforced
  • Traceback verbosity, output format, and stream selection are all left to you

The result is logging that works fine in development and breaks or disappears in production.

LogSpark fixes the operational layer, not the logging layer. The stdlib dispatch, record semantics, and handler mechanics are untouched.


What it is not

  • Not a structured logging framework (though it supports JSON output)
  • Not a drop-in replacement for loguru, structlog, or similar
  • Not a wrapper that intercepts or proxies log calls
  • Not a new API: handlers, filters, and formatters are plain stdlib objects

Core features

Feature What it gives you
Lifecycle enforcement configure -> freeze -> use: configuration happens once, explicitly
Output modes Terminal (color, Rich layout) or JSON, switchable via environment variable
Traceback control Hide, compact, or full tracebacks per-logger
Scoped debugging Temporarily lower the log level for a function or block without changing config
Dependency management Suppress or unify noisy third-party loggers without touching their code
stdlib compatibility Every component works standalone with any logging.Logger