Skip to content

fix: restore application-level logging after uvicorn takes over root logger#26

Merged
Kaiohz merged 1 commit into
mainfrom
fix/app-logging
May 21, 2026
Merged

fix: restore application-level logging after uvicorn takes over root logger#26
Kaiohz merged 1 commit into
mainfrom
fix/app-logging

Conversation

@Kaiohz
Copy link
Copy Markdown
Contributor

@Kaiohz Kaiohz commented May 21, 2026

Changes

  • Set root logger level to UVICORN_LOG_LEVEL in lifespan to override uvicorn's default WARNING level for app loggers
  • Move alembic migrations from async lifespan to run_fastapi() sync block (same pattern as raganything)
  • Add access_log=True to uvicorn.run()
  • Add UVICORN_LOG_LEVEL config setting (default: info)
  • Replace logger.error with logger.exception in except blocks
  • Replace logger.debug with logger.info throughout codebase
  • Add logger.info to route handlers for request tracing
  • Change Dockerfile CMD from 'python -m src.main' to 'python src/main.py'
  • Update .env.composable-agents with UVICORN_LOG_LEVEL

Tests

  • Verified application-level INFO logs now appear in container logs
  • Verified access logs (GET/POST) appear in container logs
  • Verified startup logs (migrations, persistence init) appear correctly

@Kaiohz Kaiohz marked this pull request as ready for review May 21, 2026 17:55
@Kaiohz Kaiohz merged commit 37275ca into main May 21, 2026
1 check passed
@Kaiohz Kaiohz deleted the fix/app-logging branch May 21, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant