skillfed

lib-log-rich

Rich-powered logging runtime with contextual metadata, multi-sink fan-out, and ring-buffer dumps

lib-log-rich v6.3.7 127.5K downloads/30d#11,742 on PyPI1
Permissive license MIT Active released

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-rich

uv

uv add lib-log-rich

poetry

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 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

Environment :: ConsoleLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Typing :: Typed

Tags

rich colored loggingstructured logging with journaldlog dump and exportmulti-backend loggingterminal logging with formattinggraylog integration loggingcontext-aware logging
structured-loggingmulti-backendrich-terminal

More Monitoring packages