2026-05-01 06:58:06,653 - main - INFO - === Logging system initialized ===
2026-05-01 06:58:06,654 - main - INFO - Log file: logs/app_20260501_065806.log
2026-05-01 06:58:06,654 - main - INFO - Log level: INFO
2026-05-01 06:58:06,654 - main - INFO - Timestamp: 20260501_065806
2026-05-01 06:58:06,734 - main - INFO - Included router: routers.admin_dashboard.router
2026-05-01 06:58:06,784 - main - INFO - Included router: routers.agent_availability.router
2026-05-01 06:58:07,650 - main - INFO - Included router: routers.ai_ticket_summary.router
2026-05-01 06:58:07,677 - main - INFO - Included router: routers.aihub.router
2026-05-01 06:58:07,692 - main - INFO - Included router: routers.auth.router
2026-05-01 06:58:07,746 - main - INFO - Included router: routers.chat_analytics_daily.router
2026-05-01 06:58:07,795 - main - INFO - Included router: routers.chat_attachments.router
2026-05-01 06:58:07,857 - main - INFO - Included router: routers.chat_branding.router
2026-05-01 06:58:07,871 - main - INFO - Included router: routers.chat_branding_api.router
2026-05-01 06:58:07,925 - main - INFO - Included router: routers.chat_conversations.router
2026-05-01 06:58:08,082 - main - INFO - Included router: routers.chat_messages.router
2026-05-01 06:58:08,129 - main - INFO - Included router: routers.chat_routing_rules.router
2026-05-01 06:58:08,153 - main - INFO - Included router: routers.contact.router
2026-05-01 06:58:08,196 - main - INFO - Included router: routers.contact_inquiries.router
2026-05-01 06:58:08,199 - main - INFO - Included router: routers.health.router
2026-05-01 06:58:08,250 - main - INFO - Included router: routers.kb_articles.router
2026-05-01 06:58:08,303 - main - INFO - Included router: routers.notification_preferences.router
2026-05-01 06:58:08,357 - main - INFO - Included router: routers.notifications.router
2026-05-01 06:58:08,416 - main - INFO - Included router: routers.plans.router
2026-05-01 06:58:08,441 - main - WARNING - Failed to import module 'routers.role_management': cannot import name 'UserResponse' from 'models.auth' (/workspace/app/backend/models/auth.py)
2026-05-01 06:58:08,465 - main - INFO - Included router: routers.settings.router
2026-05-01 06:58:08,506 - main - INFO - Included router: routers.site_settings.router
2026-05-01 06:58:08,546 - main - INFO - Included router: routers.smtp_settings.router
2026-05-01 06:58:08,587 - main - INFO - Included router: routers.storage.router
2026-05-01 06:58:08,700 - main - INFO - Included router: routers.support_chat.router
2026-05-01 06:58:08,865 - main - INFO - Included router: routers.support_departments.router
2026-05-01 06:58:08,909 - main - INFO - Included router: routers.support_seats.router
2026-05-01 06:58:08,917 - main - INFO - Included router: routers.ticket_notifications_sync.router
2026-05-01 06:58:08,955 - main - INFO - Included router: routers.ticket_summaries.router
2026-05-01 06:58:08,998 - main - INFO - Included router: routers.ticket_sync_states.router
2026-05-01 06:58:09,047 - main - INFO - Included router: routers.user.router
2026-05-01 06:58:09,100 - main - INFO - Included router: routers.user_profiles.router
2026-05-01 06:58:09,147 - main - INFO - Included router: routers.user_roles.router
2026-05-01 06:58:09,240 - main - INFO - Included router: routers.whmcs.router
2026-05-01 06:58:09,305 - main - INFO - Included router: routers.whmcs_admin.router
2026-05-01 06:58:09,354 - main - INFO - Included router: routers.whmcs_extra.router
2026-05-01 06:58:09,356 - main - INFO - === Application startup initiated ===
2026-05-01 06:58:09,356 - services.database - INFO - Ignore creating tables
2026-05-01 06:58:09,357 - services.mock_data - INFO - Ignore initialize data
2026-05-01 06:58:09,357 - services.auth - INFO - Ignore initialize admin
2026-05-01 06:58:09,357 - main - INFO - === Application startup completed successfully ===
2026-05-01 06:58:21,784 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 06:58:21,784 - core.database - WARNING - Database session maker not available, attempting lazy initialization...
2026-05-01 06:58:21,785 - core.database - WARNING - Database not initialized, attempting lazy initialization...
2026-05-01 06:58:21,785 - core.database - INFO - Starting database initialization...
2026-05-01 06:58:21,785 - core.config - DEBUG - Read dynamic attribute database_url from environment variable DATABASE_URL
2026-05-01 06:58:21,785 - core.database - INFO - Normalizing database URL for async compatibility...
2026-05-01 06:58:21,786 - core.database - INFO - Creating async database engine...
2026-05-01 06:58:21,787 - core.database - INFO - Using QueuePool with connection pooling for non-Lambda environment
2026-05-01 06:58:21,852 - core.database - INFO - Database engine created successfully
2026-05-01 06:58:21,852 - core.database - INFO - Creating async session maker...
2026-05-01 06:58:21,852 - core.database - INFO - Async session maker created successfully
2026-05-01 06:58:21,852 - core.database - INFO - Database connection initialized successfully
2026-05-01 06:58:21,853 - core.database - DEBUG - [DB_OP] Starting create_tables
2026-05-01 06:58:21,853 - core.database - INFO - 🔧 Starting table creation...
2026-05-01 06:58:24,531 - core.database - INFO - Tables initialized successfully
2026-05-01 06:58:24,532 - core.database - DEBUG - [DB_OP] Create tables completed in 2.6791s
2026-05-01 06:58:24,595 - core.database - INFO - Lazy database initialization completed successfully
2026-05-01 06:58:24,596 - core.database - DEBUG - [DB_OP] Database session created successfully in 2.8120s
2026-05-01 06:58:25,068 - core.database - DEBUG - [DB_OP] Database session cleanup after 3.2837s
2026-05-01 06:58:27,410 - services.database - DEBUG - [DB_OP] Starting database close
2026-05-01 06:58:27,477 - core.database - INFO - Database connection closed and engine disposed
2026-05-01 06:58:27,477 - services.database - INFO - Database connections closed
2026-05-01 06:58:27,478 - services.database - DEBUG - [DB_OP] Database close completed in 0.0677s
