flip_api.db.db_auth_logger ========================== .. py:module:: flip_api.db.db_auth_logger .. autoapi-nested-parse:: Dedicated logger for database IAM-auth token minting. `flip_api.utils.logger` exports `logging.getLogger("uvicorn")`, which only has handlers once uvicorn boots. But the first DB connection — and therefore the first IAM-token mint via the `do_connect` hook in `database.py` — happens inside the standalone `seed_essential_data.py` process that `entrypoint.sh` runs before uvicorn. At that point the "uvicorn" logger has no handlers and Python's `lastResort` drops anything below WARNING, so a token-mint failure during seeding would surface only as an opaque connection error with no breadcrumb pointing at IAM auth. This module owns a self-contained logger with its own `StreamHandler(stderr)` so a mint failure is visible in CloudWatch on both the seed-phase and request paths. Propagation is left enabled so pytest's `caplog` (which hooks the root logger) can still capture records during tests; the double-handler risk under uvicorn is theoretical because uvicorn configures the "uvicorn" logger, not root. Attributes ---------- .. autoapisummary:: flip_api.db.db_auth_logger.logger flip_api.db.db_auth_logger._handler Module Contents --------------- .. py:data:: logger .. py:data:: _handler