Python binding for dagstack/logger-spec — OTel-compatible structured logging, named loggers hierarchy, context propagation, sinks, scoped overrides
Project description
dagstack-logger
Python binding for dagstack/logger-spec — OTel-compatible structured logging with a named-logger hierarchy, W3C trace context propagation, pluggable sinks, and scoped overrides.
Configured through dagstack-config.
Status: Phase 1 MVP. Console / File / In-memory sinks ship; OTLP, redaction processor chain, and the AI-agent extension pack land in Phase 2+.
Roadmap
- Phase 1 release (
0.1.x) — current.LogRecord/Severity/ W3C hex encoding / dagstack JSON-lines wire format;ConsoleSink(JSON/pretty TTY-aware),FileSink(rotation),InMemorySink(ring buffer);Loggerhierarchy with context propagation, redaction by suffix, and scoped overrides.Logger.configure(config_section)integrates withdagstack-config. No OTLP sink, no LogProcessor chain, no AI-agent extension pack (§5.5 of logger-spec) yet. - Phase 2+ —
OTLPSink,LokiSink,SentrySink, the LogProcessor chain (redaction / sampling), AI-agent conventions.
Spec
The spec lives as a submodule in spec/ → dagstack/logger-spec. The core decisions are in spec/adr/0001-logger-contract.md.
Local development
git clone --recurse-submodules https://github.com/dagstack/logger-python.git
cd logger-python
uv sync --group dev
make test # pytest
make lint # ruff check + format --check
make typecheck # mypy --strict
Dependencies
dagstack-config>=0.4.1— for configuration.opentelemetry-api>=1.20,<2.0— for trace / span / baggage context propagation (mandatory per spec §3.4).opentelemetry-sdk+ exporter (optional via[otlp]extras) — forOTLPSinkin Phase 2+.
Licensing
Apache-2.0.
Related
dagstack/logger-spec— language-agnostic spec.dagstack/config-python— config binding; the logger reads itslogging:section through this binding.dagstack/plugin-system-python— plugin system; the logger'sinstrumentation_scopecan be derived from a plugin manifest.
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 dagstack_logger-0.1.3.tar.gz.
File metadata
- Download URL: dagstack_logger-0.1.3.tar.gz
- Upload date:
- Size: 137.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b3cee06df71173fc3cf81ddc9b3a1b4a4751195967ef4868ae80390f7d15d0b
|
|
| MD5 |
cbd61082366d013de8a1d48b52664f33
|
|
| BLAKE2b-256 |
18768f18388ec02b875510e0b9006dc8df5a324a565de6c7c379d3831a381e81
|
File details
Details for the file dagstack_logger-0.1.3-py3-none-any.whl.
File metadata
- Download URL: dagstack_logger-0.1.3-py3-none-any.whl
- Upload date:
- Size: 30.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
051b172bb24375e2c5de73d5cb1adf0c637080a41a902757ac99a89d2ca59b7b
|
|
| MD5 |
7819c7ad5e73cf23e23528f55e61572a
|
|
| BLAKE2b-256 |
5a49bce96516fb57d6b1c37c28cac3564b01f436ddfa50150d9b6b3d4386b775
|