Skip to main content

redlog

a modern python logging library

features

  • beautiful aligned output with automatic color detection
  • structured logging with key-value fields
  • immutable scoped loggers for hierarchical context
  • thread-safe by design
  • printf-style formatting support
  • customizable themes and formatters

quick start

import redlog

log = redlog.get_logger("app")

log.info("hello world")
log.info("user login", 
         redlog.field("username", "alice"),
         redlog.field("success", True))

db_log = log.with_name("database")
db_log.error("connection failed", redlog.field("host", "localhost"))

install

pip install redlog-py

usage

basic logging

log = redlog.get_logger("myapp")

log.critical("system failure")
log.error("something went wrong")
log.warn("potential issue")
log.info("general information")
log.debug("debugging details")

short forms

log.crt("critical")  # same as critical()
log.err("error")     # same as error()
log.inf("info")      # same as info()
log.dbg("debug")     # same as debug()

structured fields

log.info("user action",
         redlog.field("user_id", 12345),
         redlog.field("action", "login"),
         redlog.field("ip", "192.168.1.100"))

scoped loggers

request_log = log.with_field("request_id", 12345) \
                 .with_field("method", "POST")

handler_log = request_log.with_name("handler")
handler_log.info("processing request")

printf-style formatting

log.info_f("user %s logged in from %s", username, ip_address)
log.error_f("failed to connect to %s:%d", host, port)

configuration

# set minimum log level
redlog.set_level(redlog.Level.DEBUG)

# use plain theme (no colors)
redlog.set_theme(redlog.themes.PLAIN)

development

poetry install
poetry run python examples/basic.py
poetry run pytest

Metadata

Release files for redlog-py 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for redlog-py 0.1.1
File Size Uploaded Provenance
redlog_py-0.1.1.tar.gz 9.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for redlog-py 0.1.1
File Interpreter ABI Platform
redlog_py-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 21.3 kB

Release files / redlog_py-0.1.1.tar.gz

Download URL redlog_py-0.1.1.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
879aba748f385d99b227e3e50fd180e37ee04ce20810ea03184a435c3b75932b
BLAKE2b-256 checksum
How to use checksums
390009a17b1914d461dcc4a59000a6fa05d00836fd87c9d30cd992f3bf167ae5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.13.5 Darwin/24.5.0

Release files / redlog_py-0.1.1-py3-none-any.whl

Download URL redlog_py-0.1.1-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7160976cff45739b1fe02afc30e0022e2ed6312e7cf82414f886497cf811ba3
BLAKE2b-256 checksum
How to use checksums
124a882b5e29d9bf81bb1b83bcae8c8714d0759c3f638f20bf27c1c0a05a0279
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.13.5 Darwin/24.5.0

Security for redlog-py 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page