--- id: lib-log-rich version: "6.3.7" license: MIT license_treatment: permissive maintenance: active --- # lib-log-rich — Rich-powered logging runtime with contextual metadata, multi-sink fan-out, and ring-buffer dumps License: permissive · Maintenance: active · Downloads: 127.5K/mo ## 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 above — 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 pip install lib-log-rich uv add lib-log-rich poetry add lib-log-rich ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 127.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags rich colored logging, structured logging with journald, log dump and export, multi-backend logging, terminal logging with formatting, graylog integration logging, context-aware logging, structured-logging, multi-backend, rich-terminal [View on SkillFed](https://skillfed.io/packages/lib-log-rich) · [View on PyPI](https://pypi.org/project/lib-log-rich/)