lib-log-rich
Rich-powered logging runtime with contextual metadata, multi-sink fan-out, and ring-buffer dumps
What it is and what it does
lib_log_rich is a logging runtime that wraps and extends Python's standard logging with Rich terminal styling, structured metadata binding, and multi-sink fan-out. It captures colored console output tuned to terminal capabilities, while simultaneously routing events to journald (Linux), Windows Event Log, or Graylog backends—each with independent log-level gates. The package maintains a ring buffer of recent log events that can be dumped on demand in JSON, HTML, or plain text, and provides queue-backed adapters for thread-safe and async-safe console output suitable for GUIs or streaming contexts.
You initialize it once with a RuntimeConfig (service name, environment, payload limits), then either use its LoggerProxy API directly or attach a stdlib handler to bridge existing logging calls from third-party libraries and legacy code. Context metadata (user, hostname, process ID) is captured automatically. The package validates all configuration through Pydantic, offers optional .env loading, and exposes diagnostic hooks for observability without coupling to a monitoring stack.
Use it for:
- Centralize logs from a multi-threaded or async application to journald or Graylog while displaying colored output on the console.
- Export recent log history as JSON or HTML for debugging without restarting the application.
- Bridge existing stdlib logging calls in third-party libraries into a structured, multi-backend logging pipeline.
- Set independent log levels for console, journald, and Graylog so verbose debugging stays local while only errors reach remote sinks.
- Capture and inspect per-event metadata and context bindings for structured observability without manual instrumentation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Rich-styled colored console logging with structured metadata, multi-backend fan-out (journald, Windows Event Log, Graylog), and ring-buffer log dumps in JSON, HTML, or text format.
Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and offers a clean abstraction over multi-backend logging with Rich styling. Install it if you need structured logging with journald/Windows Event Log/Graylog fan-out and colored console output; skip it if you only need basic Python logging or have no use for remote log sinks.
Install
lib-log-rich on PyPI
pip
pip install lib-log-richuv
uv add lib-log-richpoetry
poetry add lib-log-richInstalling lib-log-rich
Before you install
Low friction: pure Python wheel with six runtime dependencies (rich, pydantic, orjson, python-dotenv, rich-click, lib-cli-exit-tools). Active maintenance; last release 14 days ago.
License in practice
MIT license (permissive); you may use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.
Quickstart
import logging
import lib_log_rich
from lib_log_rich.runtime import attach_std_logging
lib_log_rich.init(lib_log_rich.RuntimeConfig(service="my-app", environment="dev"))
attach_std_logging()
logging.info("Ready to go!")
lib_log_rich.shutdown()
Requires Python 3.10 or newer.
Verify before relying
- Whether OpenTelemetry integration is available or remains unimplemented as of version 6.3.7.
- Exact behavior and performance impact of queue-backed console adapters under high-throughput workloads.
- Whether Graylog support includes gRPC transport or is limited to GELF HTTP.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — lib-cli-exit-tools, orjson, pydantic, python-dotenv, rich-click, rich |
| Maintenance | actively maintained — 14 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 127,450/month — #11,742 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: lib_log_rich-6.3.7-py3-none-any.whl
Keywords: ansi, color, colored, coulored, dump, eventlog, journal, journald, logdump, logging, rich, terminal
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
mo-logsProvides structured JSON logging with…
copyleft · top 15,000 on PyPI
jsonformatterFormats Python logging output as JSON, enabling…
permissive · top 15,000 on PyPI
enrichExtends the rich library with a Console class…
permissive · top 5,000 on PyPI
coloredColored provides ANSI/VT100 escape sequences…
permissive · top 5,000 on PyPI
TwiggyTwiggy is a structured logging library that…
permissive · top 15,000 on PyPI
coloredlogsAdds colored output to Python's standard…
permissive · top 1,000 on PyPI
pdbrpdbr enhances Python's built-in debugger with…
unclear · top 5,000 on PyPI
ascii-colorsUnified terminal UI library providing colored…
permissive · top 15,000 on PyPI
log-symbolsProvides colored Unicode symbols (✔, ℹ, ⚠, ✖)…
permissive · top 5,000 on PyPI
systemd-pythonProvides Python bindings to systemd's native C…
copyleft · top 5,000 on PyPI