Context
The codebase uses structlog.get_logger(__name__) directly in 35+ files. The idiomatic structlog pattern is to call logging.getLogger(__name__) (stdlib) with structlog's ProcessorFormatter handling formatting underneath. This decouples callers from structlog entirely — they only import logging, and structlog configuration is centralized.
Task
- Enable
structlog.stdlib.LoggerFactory() in configure_logger() (currently commented out at app_logger.py:109)
- Ensure
ProcessorFormatter is wired for all stdlib log handlers
- Replace
structlog.get_logger(__name__) → logging.getLogger(__name__) across all 35+ files
- Replace
from app.utils.app_logger import logger → logging.getLogger(__name__) (2 files)
- Update
AppLogger class to use stdlib-first pattern internally
- Run full test suite + basedpyright to verify no regressions
Acceptance Criteria
Files
app/logger_config/app_logger.py — enable LoggerFactory, fix configuration
- 35+ files across
app/ — replace import pattern
app/utils/app_logger.py — update or remove shared logger
Context
The codebase uses
structlog.get_logger(__name__)directly in 35+ files. The idiomatic structlog pattern is to calllogging.getLogger(__name__)(stdlib) with structlog'sProcessorFormatterhandling formatting underneath. This decouples callers from structlog entirely — they only importlogging, and structlog configuration is centralized.Task
structlog.stdlib.LoggerFactory()inconfigure_logger()(currently commented out atapp_logger.py:109)ProcessorFormatteris wired for all stdlib log handlersstructlog.get_logger(__name__)→logging.getLogger(__name__)across all 35+ filesfrom app.utils.app_logger import logger→logging.getLogger(__name__)(2 files)AppLoggerclass to use stdlib-first pattern internallyAcceptance Criteria
logging.getLogger(__name__)— zero direct structlog imports in application codeapp_logger.pyonlybasedpyrightcleanFiles
app/logger_config/app_logger.py— enableLoggerFactory, fix configurationapp/— replace import patternapp/utils/app_logger.py— update or remove shared logger