mdc
Mapped Diagnostic Context (MDC) library for python
Decision gist · record as of 2026-08-14
No. The package is abandoned (last release September 2019, repository archived), license terms are undocumented, and it has high install friction. While it has no known vulnerabilities and no runtime dependencies, the lack of maintenance and unclear licensing make it unsuitable for new projects. Consider modern alternatives with active maintenance for structured logging with context support.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- No explicit Python version requirement specified; package declares support for both Python 2 and Python 3 but Python 2 is end-of-life.
- High install friction due to source-only distribution.
- The package is abandoned as of 2019-09-09 with no recent maintenance; the repository is archived and the last commit was 2024-02-08 with no active development.
License · maintenance · safety
(unclear) — License status is unclear—no SPDX identifier or raw license text is available in the package metadata, making it difficult to assess legal compatibility before use.
last release 2019-09-09 (2531 days) · last repo commit 2024-02-08 · 9 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 118,883 downloads/mo, #12,102 on PyPI
Alternatives
Verify before relying
pip install mdc
import logging
from mdc import MDCHandler, MDC
logging.basicConfig(level=logging.DEBUG, handlers=[MDCHandler()])
with MDC(foo='bar'):
logging.warning('test message')- Whether the package works reliably with modern Python 3 versions given its age and lack of maintenance.
- Actual license terms, since license metadata is missing from the package.
- Whether the JSON output format changes mentioned in version 1.2.0 are stable or if further breaking changes are expected.
What it is and what it does
MDC is a logging enhancement library that integrates with Python's standard logging module to attach diagnostic context to log messages. It provides a context manager and decorator to inject key-value pairs into logs, which are then formatted as structured JSON output by the MDCHandler. The library automatically captures standard logging fields (message, logger name, timestamp, level) and adds MDC-specific context alongside them, making it useful for tracing requests or operations through distributed systems or complex applications.
The package has no runtime dependencies and is designed as a drop-in handler for the logging module. However, it is abandoned—last released in September 2019 with no active maintenance. The repository is archived, and the license terms are undocumented, creating uncertainty about legal use and future compatibility with newer Python versions.
Use it for
- Attach request IDs or user context to all log entries within a request handler using the MDC context manager.
- Decorate functions with @with_mdc to automatically inject operation-specific fields into logs for that function's execution.
- Emit structured JSON logs that include both standard logging metadata and custom diagnostic fields for log aggregation systems.
- Trace execution flow across async or threaded code by maintaining context-local diagnostic information.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
The package is abandoned (last release September 2019, repository archived), license terms are undocumented, and it has high install friction. While it has no known vulnerabilities and no runtime dependencies, the lack of maintenance and unclear licensing make it unsuitable for new projects. Consider modern alternatives with active maintenance for structured logging with context support.
Install
mdc on PyPI
Before you install
High install friction due to source-only distribution. The package is abandoned as of 2019-09-09 with no recent maintenance; the repository is archived and the last commit was 2024-02-08 with no active development.
No explicit Python version requirement specified; package declares support for both Python 2 and Python 3 but Python 2 is end-of-life.
License in practice
License status is unclear—no SPDX identifier or raw license text is available in the package metadata, making it difficult to assess legal compatibility before use.
Quickstart
pip install mdc
import logging
from mdc import MDCHandler, MDC
logging.basicConfig(level=logging.DEBUG, handlers=[MDCHandler()])
with MDC(foo='bar'):
logging.warning('test message')
Verify before relying
- Whether the package works reliably with modern Python 3 versions given its age and lack of maintenance.
- Actual license terms, since license metadata is missing from the package.
- Whether the JSON output format changes mentioned in version 1.2.0 are stable or if further breaking changes are expected.
Package facts
| License | Not declared unclear |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Abandoned 2,531 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 118,883 / month, #12,102 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 2Programming Language :: Python :: 3Topic :: System :: Logging |
Evidence: mdc-1.2.1.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “mapped diagnostic context logging”
- mdcAdds Mapped Diagnostic Context (MDC) support to Python's standard…
- immutablesProvides an immutable mapping type backed by a Hash Array Mapped Trie…
- pydltPyDLT reads and writes AUTOSAR DLT (Diagnostic Log and Trace)…
Give your agent the search over MCP, or paste the wish link into any chat.
More Logging packages
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
Formats Python logging output as JSON, making logs machine-readable for parsing and ingestion into log aggregation tools.
Install it if you need JSON-formatted logs for aggregation or centralized monitoring.
structlog is a structured logging library that lets you emit logs as dictionaries with flexible output formats (JSON, logfmt, console) and integrates with Python's standard logging or runs standalone.
Install it if your application needs JSON or logfmt output, or if you want to add rich context to logs without string formatting.
Loguru provides a pre-configured logger that replaces Python's standard logging with a simpler, zero-boilerplate interface for writing log messages to stderr, files, or custom handlers.
Install it if you want logging to feel natural but with the power, structure that production code needs.
Adds colored output to Python's standard logging module using ANSI escape sequences, with automatic fallback support for Windows terminals.
However, it is abandoned and receives no maintenance, so it will not adapt to future Python changes or platform updates.
wandb is a machine learning experiment tracking and visualization platform that logs metrics, hyperparameters, datasets, and models to a centralized dashboard for monitoring and comparing training runs.
Install it if you need centralized experiment tracking, comparison, and visualization for machine learning projects; skip it if you prefer local-only logging or have…
See also datadog-logger · daiquiri · logfmter · google-cloud-logging · google-cloud-appengine-logging · django-structlog · mo-logs · icd-mappings · logstash_formatter · google-cloud-bigquery-logging