2026-05-01 06:46:53,663 - main - INFO - === Logging system initialized ===
2026-05-01 06:46:53,664 - main - INFO - Log file: logs/app_20260501_064653.log
2026-05-01 06:46:53,664 - main - INFO - Log level: INFO
2026-05-01 06:46:53,664 - main - INFO - Timestamp: 20260501_064653
2026-05-01 06:46:53,749 - main - INFO - Included router: routers.admin_dashboard.router
2026-05-01 06:46:53,806 - main - INFO - Included router: routers.agent_availability.router
2026-05-01 06:46:54,756 - main - INFO - Included router: routers.ai_ticket_summary.router
2026-05-01 06:46:54,777 - main - INFO - Included router: routers.aihub.router
2026-05-01 06:46:54,792 - main - INFO - Included router: routers.auth.router
2026-05-01 06:46:54,842 - main - INFO - Included router: routers.chat_analytics_daily.router
2026-05-01 06:46:54,889 - main - INFO - Included router: routers.chat_attachments.router
2026-05-01 06:46:54,966 - main - INFO - Included router: routers.chat_branding.router
2026-05-01 06:46:54,985 - main - INFO - Included router: routers.chat_branding_api.router
2026-05-01 06:46:55,045 - main - INFO - Included router: routers.chat_conversations.router
2026-05-01 06:46:55,215 - main - INFO - Included router: routers.chat_messages.router
2026-05-01 06:46:55,255 - main - INFO - Included router: routers.chat_routing_rules.router
2026-05-01 06:46:55,282 - main - INFO - Included router: routers.contact.router
2026-05-01 06:46:55,329 - main - INFO - Included router: routers.contact_inquiries.router
2026-05-01 06:46:55,333 - main - INFO - Included router: routers.health.router
2026-05-01 06:46:55,379 - main - INFO - Included router: routers.kb_articles.router
2026-05-01 06:46:55,434 - main - INFO - Included router: routers.notification_preferences.router
2026-05-01 06:46:55,495 - main - INFO - Included router: routers.notifications.router
2026-05-01 06:46:55,555 - main - INFO - Included router: routers.plans.router
2026-05-01 06:46:55,576 - main - INFO - Included router: routers.settings.router
2026-05-01 06:46:55,625 - main - INFO - Included router: routers.site_settings.router
2026-05-01 06:46:55,677 - main - INFO - Included router: routers.smtp_settings.router
2026-05-01 06:46:55,716 - main - INFO - Included router: routers.storage.router
2026-05-01 06:46:55,854 - main - INFO - Included router: routers.support_chat.router
2026-05-01 06:46:56,042 - main - INFO - Included router: routers.support_departments.router
2026-05-01 06:46:56,096 - main - INFO - Included router: routers.support_seats.router
2026-05-01 06:46:56,105 - main - INFO - Included router: routers.ticket_notifications_sync.router
2026-05-01 06:46:56,146 - main - INFO - Included router: routers.ticket_summaries.router
2026-05-01 06:46:56,190 - main - INFO - Included router: routers.ticket_sync_states.router
2026-05-01 06:46:56,199 - main - INFO - Included router: routers.user.router
2026-05-01 06:46:56,246 - main - INFO - Included router: routers.user_profiles.router
2026-05-01 06:46:56,287 - main - INFO - Included router: routers.user_roles.router
2026-05-01 06:46:56,378 - main - INFO - Included router: routers.whmcs.router
2026-05-01 06:46:56,445 - main - INFO - Included router: routers.whmcs_admin.router
2026-05-01 06:46:56,492 - main - INFO - Included router: routers.whmcs_extra.router
2026-05-01 06:46:56,495 - main - INFO - === Application startup initiated ===
2026-05-01 06:46:56,495 - services.database - INFO - Ignore creating tables
2026-05-01 06:46:56,495 - services.mock_data - INFO - Ignore initialize data
2026-05-01 06:46:56,495 - services.auth - INFO - Ignore initialize admin
2026-05-01 06:46:56,495 - main - INFO - === Application startup completed successfully ===
2026-05-01 06:47:03,641 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 06:47:03,642 - core.database - WARNING - Database session maker not available, attempting lazy initialization...
2026-05-01 06:47:03,642 - core.database - WARNING - Database not initialized, attempting lazy initialization...
2026-05-01 06:47:03,642 - core.database - INFO - Starting database initialization...
2026-05-01 06:47:03,642 - core.config - DEBUG - Read dynamic attribute database_url from environment variable DATABASE_URL
2026-05-01 06:47:03,643 - core.database - INFO - Normalizing database URL for async compatibility...
2026-05-01 06:47:03,644 - core.database - INFO - Creating async database engine...
2026-05-01 06:47:03,645 - core.database - INFO - Using QueuePool with connection pooling for non-Lambda environment
2026-05-01 06:47:03,699 - core.database - INFO - Database engine created successfully
2026-05-01 06:47:03,700 - core.database - INFO - Creating async session maker...
2026-05-01 06:47:03,700 - core.database - INFO - Async session maker created successfully
2026-05-01 06:47:03,700 - core.database - INFO - Database connection initialized successfully
2026-05-01 06:47:03,700 - core.database - DEBUG - [DB_OP] Starting create_tables
2026-05-01 06:47:03,700 - core.database - INFO - 🔧 Starting table creation...
2026-05-01 06:47:03,708 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-05-01 06:47:03,710 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 06:47:03,711 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0004s
2026-05-01 06:47:03,716 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 06:47:03,717 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0008s
2026-05-01 06:47:03,718 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"general"}, sort=None, skip=0, limit=1, fields=None
2026-05-01 06:47:04,980 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.2695s
2026-05-01 06:47:05,177 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-01 06:47:05,177 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.4609s
2026-05-01 06:47:06,391 - core.database - INFO - Tables initialized successfully
2026-05-01 06:47:06,392 - core.database - DEBUG - [DB_OP] Create tables completed in 2.6917s
2026-05-01 06:47:06,456 - core.database - INFO - Lazy database initialization completed successfully
2026-05-01 06:47:06,456 - core.database - DEBUG - [DB_OP] Database session created successfully in 2.8151s
2026-05-01 06:47:06,457 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"branding"}, sort=None, skip=0, limit=1, fields=None
2026-05-01 06:47:07,031 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-01 06:47:07,032 - core.database - DEBUG - [DB_OP] Database session cleanup after 3.3906s
2026-05-01 06:47:57,414 - services.database - DEBUG - [DB_OP] Starting database close
2026-05-01 06:47:57,616 - core.database - INFO - Database connection closed and engine disposed
2026-05-01 06:47:57,617 - services.database - INFO - Database connections closed
2026-05-01 06:47:57,617 - services.database - DEBUG - [DB_OP] Database close completed in 0.2025s
