2026-04-28 10:11:47,634 - main - INFO - === Logging system initialized ===
2026-04-28 10:11:47,634 - main - INFO - Log file: logs/app_20260428_101147.log
2026-04-28 10:11:47,634 - main - INFO - Log level: INFO
2026-04-28 10:11:47,634 - main - INFO - Timestamp: 20260428_101147
2026-04-28 10:11:48,652 - main - INFO - Included router: routers.aihub.router
2026-04-28 10:11:48,672 - main - INFO - Included router: routers.auth.router
2026-04-28 10:11:48,675 - main - INFO - Included router: routers.health.router
2026-04-28 10:11:48,700 - main - INFO - Included router: routers.settings.router
2026-04-28 10:11:48,748 - main - INFO - Included router: routers.storage.router
2026-04-28 10:11:48,756 - main - INFO - Included router: routers.user.router
2026-04-28 10:11:48,815 - main - INFO - Included router: routers.user_profiles.router
2026-04-28 10:11:48,859 - main - INFO - Included router: routers.whmcs.router
2026-04-28 10:11:48,860 - main - INFO - === Application startup initiated ===
2026-04-28 10:11:48,861 - services.database - INFO - Ignore creating tables
2026-04-28 10:11:48,861 - services.mock_data - INFO - Ignore initialize data
2026-04-28 10:11:48,861 - services.auth - INFO - Ignore initialize admin
2026-04-28 10:11:48,862 - main - INFO - === Application startup completed successfully ===
2026-04-28 10:11:53,521 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-04-28 10:12:20,067 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/whmcs/me
2026-04-28 10:13:15,317 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-04-28 10:13:29,846 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-04-28 10:13:29,852 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/whmcs/me
2026-04-28 10:13:35,154 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-04-28 10:13:35,154 - core.database - WARNING - Database session maker not available, attempting lazy initialization...
2026-04-28 10:13:35,155 - core.database - WARNING - Database not initialized, attempting lazy initialization...
2026-04-28 10:13:35,157 - core.database - INFO - Starting database initialization...
2026-04-28 10:13:35,157 - core.config - DEBUG - Read dynamic attribute database_url from environment variable DATABASE_URL
2026-04-28 10:13:35,158 - core.database - INFO - Normalizing database URL for async compatibility...
2026-04-28 10:13:35,159 - core.database - INFO - Creating async database engine...
2026-04-28 10:13:35,159 - core.database - INFO - Using QueuePool with connection pooling for non-Lambda environment
2026-04-28 10:13:35,246 - core.database - INFO - Database engine created successfully
2026-04-28 10:13:35,248 - core.database - INFO - Creating async session maker...
2026-04-28 10:13:35,248 - core.database - INFO - Async session maker created successfully
2026-04-28 10:13:35,249 - core.database - INFO - Database connection initialized successfully
2026-04-28 10:13:35,249 - core.database - DEBUG - [DB_OP] Starting create_tables
2026-04-28 10:13:35,250 - core.database - INFO - 🔧 Starting table creation...
2026-04-28 10:13:36,637 - core.database - INFO - Tables initialized successfully
2026-04-28 10:13:36,638 - core.database - DEBUG - [DB_OP] Create tables completed in 1.3888s
2026-04-28 10:13:36,702 - core.database - INFO - Lazy database initialization completed successfully
2026-04-28 10:13:36,702 - core.database - DEBUG - [DB_OP] Database session created successfully in 1.5483s
2026-04-28 10:13:37,343 - routers.auth - DEBUG - [get_dynamic_backend_url] mgx-external-domain=None, x-forwarded-host=99v30-99daa102ba1446f6aa2f99771f457055-preview.app.atoms.dev, host=127.0.0.1:8002, scheme=https, dynamic_url=https://99v30-99daa102ba1446f6aa2f99771f457055-preview.app.atoms.dev
2026-04-28 10:13:37,343 - routers.auth - INFO - [login] Starting OIDC flow with redirect_uri=https://99v30-99daa102ba1446f6aa2f99771f457055-preview.app.atoms.dev/api/v1/auth/callback
2026-04-28 10:13:37,343 - core.config - DEBUG - Read dynamic attribute oidc_client_id from environment variable OIDC_CLIENT_ID
2026-04-28 10:13:37,343 - core.config - DEBUG - Read dynamic attribute oidc_scope from environment variable OIDC_SCOPE
2026-04-28 10:13:37,343 - core.config - DEBUG - Read dynamic attribute oidc_issuer_url from environment variable OIDC_ISSUER_URL
2026-04-28 10:13:37,344 - core.database - DEBUG - [DB_OP] Database session cleanup after 2.1901s
2026-04-28 10:13:38,621 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-04-28 10:13:38,622 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0007s
2026-04-28 10:13:39,065 - routers.auth - DEBUG - [get_dynamic_backend_url] mgx-external-domain=None, x-forwarded-host=99v30-99daa102ba1446f6aa2f99771f457055-preview.app.atoms.dev, host=127.0.0.1:8002, scheme=https, dynamic_url=https://99v30-99daa102ba1446f6aa2f99771f457055-preview.app.atoms.dev
2026-04-28 10:13:39,065 - routers.auth - INFO - [login] Starting OIDC flow with redirect_uri=https://99v30-99daa102ba1446f6aa2f99771f457055-preview.app.atoms.dev/api/v1/auth/callback
2026-04-28 10:13:39,065 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4442s
2026-04-28 10:14:17,268 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-04-28 10:14:17,948 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-04-28 10:14:25,986 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-04-28 10:14:25,987 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-04-28 10:14:26,432 - routers.auth - DEBUG - [get_dynamic_backend_url] mgx-external-domain=None, x-forwarded-host=99v30-99daa102ba1446f6aa2f99771f457055-preview.app.atoms.dev, host=127.0.0.1:8002, scheme=https, dynamic_url=https://99v30-99daa102ba1446f6aa2f99771f457055-preview.app.atoms.dev
2026-04-28 10:14:26,433 - routers.auth - INFO - [login] Starting OIDC flow with redirect_uri=https://99v30-99daa102ba1446f6aa2f99771f457055-preview.app.atoms.dev/api/v1/auth/callback
2026-04-28 10:14:26,434 - core.database - DEBUG - [DB_OP] Database session cleanup after 0.4478s
2026-04-28 10:14:38,344 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-04-28 10:14:47,691 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-04-28 10:15:10,735 - services.database - DEBUG - [DB_OP] Starting database close
2026-04-28 10:15:10,802 - core.database - INFO - Database connection closed and engine disposed
2026-04-28 10:15:10,802 - services.database - INFO - Database connections closed
2026-04-28 10:15:10,803 - services.database - DEBUG - [DB_OP] Database close completed in 0.0677s
