Python logging Handler
======================
Purpose
-------
Bridge the Python standard-library ``logging`` module into ``oc_diagnostics``
so that libraries and frameworks that emit log records via ``logging.getLogger``
are automatically captured and displayed through the unified diagnostics system.
Responsibilities
----------------
- Provide ``OcDiagnosticsHandler``, a ``logging.Handler`` subclass that
converts each ``LogRecord`` to an ``oc_diagnostics._dbg()`` call.
- Map Python logging levels to oc_diagnostics diagnostic levels via a
configurable ``level_map`` dict.
- Use a sensible default mapping:
DEBUG → L4 (deep tracing)
INFO → L2 (lifecycle)
WARNING → L1 (errors only)
ERROR → L1
CRITICAL → L1
Diagnostics
-----------
Domain: configurable (default: "GENERAL")
Levels: determined by level_map at runtime
Contracts
---------
- Must not raise; errors are delegated to ``logging.Handler.handleError()``.
- Requires no optional dependencies (pure Python, always available).
- The ``domain`` and ``level_map`` are settable at construction time.