Ergonomic Python logging with Rich-first defaults and a path to structured observability.
Project description
ultilog
ultilog is an ergonomic Python logging package that starts with a tiny API and
scales toward structured observability.
The default experience is intentionally small:
from ultilog import get_logger
log = get_logger()
log.info("app.started")
No explicit settings object is required for ordinary use. The package lazily configures logging on first access, installs a useful console handler, and then returns a standard-library logger.
Install
pdm add ultilog
Other package managers:
pip install ultilog
uv add ultilog
poetry add ultilog
Future extras are designed to look like:
pip install "ultilog[structlog]"
pip install "ultilog[otel]"
pip install "ultilog[full]"
Quickstart
from ultilog import get_logger
log = get_logger()
log.info("hello")
Explicit naming is supported:
log = get_logger(__name__)
Custom names are supported:
log = get_logger("my.service")
Optional setup is available when needed:
from ultilog import setup, get_logger
setup(level="DEBUG", force=True)
log = get_logger()
Modes
The scaffold supports three modes:
rich: pretty local console logsplain: simple stream loggingjson: machine-readable JSON logs
from ultilog import setup, get_logger
setup(mode="json", force=True)
get_logger("api").info("request.finished")
Context
Context belongs at runtime boundaries, not logger creation time.
from ultilog import get_logger, logging_context
log = get_logger("worker")
with logging_context(job_id="job_1", queue="emails"):
log.info("job.started")
Current Scaffold Includes
- zero-config
get_logger() - optional
setup(...) - explicit
configure(settings)for advanced use - Rich console handler factory
- plain and JSON output modes
- contextvars-based context helpers
- ASGI/FastAPI integration shapes
- optional dependency helpers
- diagnostics CLI
- unit, integration, and e2e test layout
- docs, examples, CI skeleton, and future integration namespaces
CLI
python -m ultilog doctor --json
python -m ultilog demo --mode plain
python -m ultilog demo --mode json
Development
pdm sync -G dev
pdm run pytest
pdm run ruff check .
pdm run mypy src/ultilog
For local source-tree experiments without installing the package:
PYTHONPATH=src python examples/01_zero_config.py
PYTHONPATH=src python -m ultilog doctor --json
Design Direction
ultilog should remain easy at the surface and layered underneath. The default
API should stay tiny while internals grow to support structured logging,
OpenTelemetry, context propagation, exporters, and framework integrations.
See docs/ for architecture, testing strategy, roadmap, and cookbook notes.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ultilog-0.1.0.tar.gz.
File metadata
- Download URL: ultilog-0.1.0.tar.gz
- Upload date:
- Size: 34.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2843caf8ad00ffc19758ae544aa382811624f541ae9b4812544c85aa27b844c9
|
|
| MD5 |
9fa2522aee716f259065fbdf0abd509b
|
|
| BLAKE2b-256 |
1eb9f7fef5f2b6c60c02cfc8815ed1113032fd840a9e87ccbf42efcd0b6e1421
|
Provenance
The following attestation bundles were made for ultilog-0.1.0.tar.gz:
Publisher:
release.yml on pr1m8/ultilog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ultilog-0.1.0.tar.gz -
Subject digest:
2843caf8ad00ffc19758ae544aa382811624f541ae9b4812544c85aa27b844c9 - Sigstore transparency entry: 1408361917
- Sigstore integration time:
-
Permalink:
pr1m8/ultilog@acd9eb2496bf29f7b538b74bf20d000a4e521971 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pr1m8
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@acd9eb2496bf29f7b538b74bf20d000a4e521971 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ultilog-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ultilog-0.1.0-py3-none-any.whl
- Upload date:
- Size: 53.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79387df102546a5d4562d59596d3e174d87cf5a1178c101ffbb4b6e07326fc61
|
|
| MD5 |
57bc5b8a47abec2790dc1a9167c1edc1
|
|
| BLAKE2b-256 |
94e06cf05470878743298f59dfbb7c3d61370e4c5682c6ec5e96ed6479ca492d
|
Provenance
The following attestation bundles were made for ultilog-0.1.0-py3-none-any.whl:
Publisher:
release.yml on pr1m8/ultilog
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ultilog-0.1.0-py3-none-any.whl -
Subject digest:
79387df102546a5d4562d59596d3e174d87cf5a1178c101ffbb4b6e07326fc61 - Sigstore transparency entry: 1408362054
- Sigstore integration time:
-
Permalink:
pr1m8/ultilog@acd9eb2496bf29f7b538b74bf20d000a4e521971 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pr1m8
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@acd9eb2496bf29f7b538b74bf20d000a4e521971 -
Trigger Event:
push
-
Statement type: