2026-05-01 21:43:24,119 - main - INFO - === Logging system initialized ===
2026-05-01 21:43:24,119 - main - INFO - Log file: logs/app_20260501_214324.log
2026-05-01 21:43:24,119 - main - INFO - Log level: INFO
2026-05-01 21:43:24,120 - main - INFO - Timestamp: 20260501_214324
2026-05-01 21:43:24,175 - main - INFO - Included router: routers.admin_dashboard.router
2026-05-01 21:43:24,215 - main - INFO - Included router: routers.agent_availability.router
2026-05-01 21:43:25,073 - main - INFO - Included router: routers.ai_ticket_summary.router
2026-05-01 21:43:25,094 - main - INFO - Included router: routers.aihub.router
2026-05-01 21:43:25,110 - main - INFO - Included router: routers.auth.router
2026-05-01 21:43:25,157 - main - INFO - Included router: routers.chat_analytics_daily.router
2026-05-01 21:43:25,200 - main - INFO - Included router: routers.chat_attachments.router
2026-05-01 21:43:25,271 - main - INFO - Included router: routers.chat_branding.router
2026-05-01 21:43:25,287 - main - INFO - Included router: routers.chat_branding_api.router
2026-05-01 21:43:25,340 - main - INFO - Included router: routers.chat_conversations.router
2026-05-01 21:43:25,460 - main - INFO - Included router: routers.chat_messages.router
2026-05-01 21:43:25,502 - main - INFO - Included router: routers.chat_routing_rules.router
2026-05-01 21:43:25,524 - main - INFO - Included router: routers.contact.router
2026-05-01 21:43:25,564 - main - INFO - Included router: routers.contact_inquiries.router
2026-05-01 21:43:25,565 - main - INFO - Included router: routers.health.router
2026-05-01 21:43:25,610 - main - INFO - Included router: routers.kb_articles.router
2026-05-01 21:43:25,667 - main - INFO - Included router: routers.notification_preferences.router
2026-05-01 21:43:25,714 - main - INFO - Included router: routers.notifications.router
2026-05-01 21:43:25,718 - main - INFO - Included router: routers.notifications_extras.router
2026-05-01 21:43:25,801 - main - INFO - Included router: routers.oauth.router
2026-05-01 21:43:25,854 - main - INFO - Included router: routers.plans.router
2026-05-01 21:43:25,878 - main - INFO - Included router: routers.role_management.router
2026-05-01 21:43:25,898 - main - INFO - Included router: routers.settings.router
2026-05-01 21:43:25,936 - main - INFO - Included router: routers.site_settings.router
2026-05-01 21:43:25,968 - main - INFO - Included router: routers.smtp_settings.router
2026-05-01 21:43:26,005 - main - INFO - Included router: routers.storage.router
2026-05-01 21:43:26,242 - main - INFO - Included router: routers.support_chat.router
2026-05-01 21:43:26,279 - main - INFO - Included router: routers.support_departments.router
2026-05-01 21:43:26,329 - main - INFO - Included router: routers.support_seats.router
2026-05-01 21:43:26,339 - main - INFO - Included router: routers.ticket_notifications_sync.router
2026-05-01 21:43:26,379 - main - INFO - Included router: routers.ticket_summaries.router
2026-05-01 21:43:26,429 - main - INFO - Included router: routers.ticket_sync_states.router
2026-05-01 21:43:26,438 - main - INFO - Included router: routers.user.router
2026-05-01 21:43:26,484 - main - INFO - Included router: routers.user_profiles.router
2026-05-01 21:43:26,526 - main - INFO - Included router: routers.user_roles.router
2026-05-01 21:43:26,547 - main - INFO - Included router: routers.whmcs.router
2026-05-01 21:43:26,614 - main - INFO - Included router: routers.whmcs_admin.router
2026-05-01 21:43:26,655 - main - INFO - Included router: routers.whmcs_extra.router
2026-05-01 21:43:26,657 - main - INFO - === Application startup initiated ===
2026-05-01 21:43:26,657 - services.database - INFO - Ignore creating tables
2026-05-01 21:43:26,657 - services.mock_data - INFO - Ignore initialize data
2026-05-01 21:43:26,658 - services.auth - INFO - Ignore initialize admin
2026-05-01 21:43:26,658 - main - INFO - === Application startup completed successfully ===
2026-05-01 21:43:54,719 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 21:43:54,719 - core.database - WARNING - Database session maker not available, attempting lazy initialization...
2026-05-01 21:43:54,719 - core.database - WARNING - Database not initialized, attempting lazy initialization...
2026-05-01 21:43:54,720 - core.database - INFO - Starting database initialization...
2026-05-01 21:43:54,720 - core.config - DEBUG - Read dynamic attribute database_url from environment variable DATABASE_URL
2026-05-01 21:43:54,720 - core.database - INFO - Normalizing database URL for async compatibility...
2026-05-01 21:43:54,721 - core.database - INFO - Creating async database engine...
2026-05-01 21:43:54,721 - core.database - INFO - Using QueuePool with connection pooling for non-Lambda environment
2026-05-01 21:43:54,762 - core.database - INFO - Database engine created successfully
2026-05-01 21:43:54,762 - core.database - INFO - Creating async session maker...
2026-05-01 21:43:54,762 - core.database - INFO - Async session maker created successfully
2026-05-01 21:43:54,762 - core.database - INFO - Database connection initialized successfully
2026-05-01 21:43:54,762 - core.database - DEBUG - [DB_OP] Starting create_tables
2026-05-01 21:43:54,762 - core.database - INFO - 🔧 Starting table creation...
2026-05-01 21:43:54,768 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-05-01 21:43:54,770 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 21:43:54,771 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0002s
2026-05-01 21:43:54,771 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"general"}, sort=None, skip=0, limit=1, fields=None
2026-05-01 21:43:54,774 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 21:43:54,774 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0002s
2026-05-01 21:43:54,774 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"branding"}, sort=None, skip=0, limit=1, fields=None
2026-05-01 21:43:56,169 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-01 21:43:56,169 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.3957s
2026-05-01 21:43:56,170 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-01 21:43:56,170 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.3997s
2026-05-01 21:43:57,530 - core.database - INFO - Tables initialized successfully
2026-05-01 21:43:57,530 - core.database - DEBUG - [DB_OP] Create tables completed in 2.7675s
2026-05-01 21:43:57,593 - core.database - INFO - Lazy database initialization completed successfully
2026-05-01 21:43:57,593 - core.database - DEBUG - [DB_OP] Database session created successfully in 2.8746s
2026-05-01 21:43:58,038 - core.database - DEBUG - [DB_OP] Database session cleanup after 3.3190s
2026-05-01 21:44:19,235 - services.database - DEBUG - [DB_OP] Starting database close
2026-05-01 21:44:19,432 - core.database - INFO - Database connection closed and engine disposed
2026-05-01 21:44:19,433 - services.database - INFO - Database connections closed
2026-05-01 21:44:19,433 - services.database - DEBUG - [DB_OP] Database close completed in 0.1980s
