2026-05-01 06:34:31,223 - main - INFO - === Logging system initialized ===
2026-05-01 06:34:31,224 - main - INFO - Log file: logs/app_20260501_063431.log
2026-05-01 06:34:31,224 - main - INFO - Log level: INFO
2026-05-01 06:34:31,224 - main - INFO - Timestamp: 20260501_063431
2026-05-01 06:34:31,300 - main - INFO - Included router: routers.admin_dashboard.router
2026-05-01 06:34:31,352 - main - INFO - Included router: routers.agent_availability.router
2026-05-01 06:34:32,241 - main - INFO - Included router: routers.ai_ticket_summary.router
2026-05-01 06:34:32,269 - main - INFO - Included router: routers.aihub.router
2026-05-01 06:34:32,283 - main - INFO - Included router: routers.auth.router
2026-05-01 06:34:32,333 - main - INFO - Included router: routers.chat_analytics_daily.router
2026-05-01 06:34:32,389 - main - INFO - Included router: routers.chat_attachments.router
2026-05-01 06:34:32,456 - main - INFO - Included router: routers.chat_branding.router
2026-05-01 06:34:32,471 - main - INFO - Included router: routers.chat_branding_api.router
2026-05-01 06:34:32,524 - main - INFO - Included router: routers.chat_conversations.router
2026-05-01 06:34:32,667 - main - INFO - Included router: routers.chat_messages.router
2026-05-01 06:34:32,711 - main - INFO - Included router: routers.chat_routing_rules.router
2026-05-01 06:34:32,733 - main - INFO - Included router: routers.contact.router
2026-05-01 06:34:32,783 - main - INFO - Included router: routers.contact_inquiries.router
2026-05-01 06:34:32,785 - main - INFO - Included router: routers.health.router
2026-05-01 06:34:32,832 - main - INFO - Included router: routers.kb_articles.router
2026-05-01 06:34:32,879 - main - INFO - Included router: routers.notification_preferences.router
2026-05-01 06:34:32,926 - main - INFO - Included router: routers.notifications.router
2026-05-01 06:34:32,979 - main - INFO - Included router: routers.plans.router
2026-05-01 06:34:33,002 - main - INFO - Included router: routers.settings.router
2026-05-01 06:34:33,071 - main - INFO - Included router: routers.site_settings.router
2026-05-01 06:34:33,115 - main - INFO - Included router: routers.smtp_settings.router
2026-05-01 06:34:33,154 - main - INFO - Included router: routers.storage.router
2026-05-01 06:34:33,264 - main - INFO - Included router: routers.support_chat.router
2026-05-01 06:34:33,456 - main - INFO - Included router: routers.support_departments.router
2026-05-01 06:34:33,498 - main - INFO - Included router: routers.support_seats.router
2026-05-01 06:34:33,508 - main - INFO - Included router: routers.ticket_notifications_sync.router
2026-05-01 06:34:33,545 - main - INFO - Included router: routers.ticket_summaries.router
2026-05-01 06:34:33,587 - main - INFO - Included router: routers.ticket_sync_states.router
2026-05-01 06:34:33,597 - main - INFO - Included router: routers.user.router
2026-05-01 06:34:33,646 - main - INFO - Included router: routers.user_profiles.router
2026-05-01 06:34:33,688 - main - INFO - Included router: routers.user_roles.router
2026-05-01 06:34:33,773 - main - INFO - Included router: routers.whmcs.router
2026-05-01 06:34:33,833 - main - INFO - Included router: routers.whmcs_admin.router
2026-05-01 06:34:33,871 - main - INFO - Included router: routers.whmcs_extra.router
2026-05-01 06:34:33,873 - main - INFO - === Application startup initiated ===
2026-05-01 06:34:33,873 - services.database - INFO - Ignore creating tables
2026-05-01 06:34:33,873 - services.mock_data - INFO - Ignore initialize data
2026-05-01 06:34:33,873 - services.auth - INFO - Ignore initialize admin
2026-05-01 06:34:33,873 - main - INFO - === Application startup completed successfully ===
2026-05-01 06:34:41,966 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 06:34:41,967 - core.database - WARNING - Database session maker not available, attempting lazy initialization...
2026-05-01 06:34:41,967 - core.database - WARNING - Database not initialized, attempting lazy initialization...
2026-05-01 06:34:41,967 - core.database - INFO - Starting database initialization...
2026-05-01 06:34:41,967 - core.config - DEBUG - Read dynamic attribute database_url from environment variable DATABASE_URL
2026-05-01 06:34:41,968 - core.database - INFO - Normalizing database URL for async compatibility...
2026-05-01 06:34:41,969 - core.database - INFO - Creating async database engine...
2026-05-01 06:34:41,969 - core.database - INFO - Using QueuePool with connection pooling for non-Lambda environment
2026-05-01 06:34:42,053 - core.database - INFO - Database engine created successfully
2026-05-01 06:34:42,054 - core.database - INFO - Creating async session maker...
2026-05-01 06:34:42,054 - core.database - INFO - Async session maker created successfully
2026-05-01 06:34:42,054 - core.database - INFO - Database connection initialized successfully
2026-05-01 06:34:42,054 - core.database - DEBUG - [DB_OP] Starting create_tables
2026-05-01 06:34:42,054 - core.database - INFO - 🔧 Starting table creation...
2026-05-01 06:34:42,062 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-05-01 06:34:42,063 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 06:34:42,063 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0002s
2026-05-01 06:34:42,063 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"general"}, sort=None, skip=0, limit=1, fields=None
2026-05-01 06:34:42,069 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 06:34:42,069 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0003s
2026-05-01 06:34:43,334 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.2652s
2026-05-01 06:34:43,460 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-01 06:34:43,461 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.3987s
2026-05-01 06:34:44,714 - core.database - INFO - Tables initialized successfully
2026-05-01 06:34:44,714 - core.database - DEBUG - [DB_OP] Create tables completed in 2.6606s
2026-05-01 06:34:44,778 - core.database - INFO - Lazy database initialization completed successfully
2026-05-01 06:34:44,779 - core.database - DEBUG - [DB_OP] Database session created successfully in 2.8122s
2026-05-01 06:34:44,779 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"branding"}, sort=None, skip=0, limit=1, fields=None
2026-05-01 06:34:45,352 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-01 06:34:45,353 - core.database - DEBUG - [DB_OP] Database session cleanup after 3.3863s
2026-05-01 06:34:58,826 - services.database - DEBUG - [DB_OP] Starting database close
2026-05-01 06:34:59,028 - core.database - INFO - Database connection closed and engine disposed
2026-05-01 06:34:59,028 - services.database - INFO - Database connections closed
2026-05-01 06:34:59,028 - services.database - DEBUG - [DB_OP] Database close completed in 0.2019s
