"""Logger factory enforcing the ``extensions.`` prefix invariant."""

from __future__ import annotations

import logging


def get_logger(name: str) -> logging.Logger:
    """
    Return a logger under the ``extensions.`` namespace prefix.

    Every module in the audit pulls its logger via this helper so the
    prefix that operator-side filters and Sentry routes are tuned for
    stays consistent. A bare ``logging.getLogger(__name__)`` somewhere
    in the package would silently bypass the ``extensions.*`` rule and
    drop those records from the curated forensic stream.
    """
    return logging.getLogger(f"extensions.{name}")
