2026-05-01 05:29:38,879 - main - INFO - === Logging system initialized ===
2026-05-01 05:29:38,880 - main - INFO - Log file: logs/app_20260501_052938.log
2026-05-01 05:29:38,880 - main - INFO - Log level: INFO
2026-05-01 05:29:38,880 - main - INFO - Timestamp: 20260501_052938
2026-05-01 05:29:38,964 - main - INFO - Included router: routers.admin_dashboard.router
2026-05-01 05:29:39,013 - main - INFO - Included router: routers.agent_availability.router
2026-05-01 05:29:39,915 - main - INFO - Included router: routers.ai_ticket_summary.router
2026-05-01 05:29:39,936 - main - INFO - Included router: routers.aihub.router
2026-05-01 05:29:39,949 - main - INFO - Included router: routers.auth.router
2026-05-01 05:29:40,000 - main - INFO - Included router: routers.chat_analytics_daily.router
2026-05-01 05:29:40,082 - main - INFO - Included router: routers.chat_attachments.router
2026-05-01 05:29:40,179 - main - INFO - Included router: routers.chat_branding.router
2026-05-01 05:29:40,195 - main - INFO - Included router: routers.chat_branding_api.router
2026-05-01 05:29:40,256 - main - INFO - Included router: routers.chat_conversations.router
2026-05-01 05:29:40,454 - main - INFO - Included router: routers.chat_messages.router
2026-05-01 05:29:40,517 - main - INFO - Included router: routers.chat_routing_rules.router
2026-05-01 05:29:40,548 - main - INFO - Included router: routers.contact.router
2026-05-01 05:29:40,590 - main - INFO - Included router: routers.contact_inquiries.router
2026-05-01 05:29:40,591 - main - INFO - Included router: routers.health.router
2026-05-01 05:29:40,638 - main - INFO - Included router: routers.kb_articles.router
2026-05-01 05:29:40,691 - main - INFO - Included router: routers.notification_preferences.router
2026-05-01 05:29:40,745 - main - INFO - Included router: routers.notifications.router
2026-05-01 05:29:40,795 - main - INFO - Included router: routers.plans.router
2026-05-01 05:29:40,815 - main - INFO - Included router: routers.settings.router
2026-05-01 05:29:40,857 - main - INFO - Included router: routers.site_settings.router
2026-05-01 05:29:40,905 - main - INFO - Included router: routers.smtp_settings.router
2026-05-01 05:29:40,941 - main - INFO - Included router: routers.storage.router
2026-05-01 05:29:41,072 - main - INFO - Included router: routers.support_chat.router
2026-05-01 05:29:41,281 - main - INFO - Included router: routers.support_departments.router
2026-05-01 05:29:41,328 - main - INFO - Included router: routers.support_seats.router
2026-05-01 05:29:41,337 - main - INFO - Included router: routers.ticket_notifications_sync.router
2026-05-01 05:29:41,377 - main - INFO - Included router: routers.ticket_summaries.router
2026-05-01 05:29:41,417 - main - INFO - Included router: routers.ticket_sync_states.router
2026-05-01 05:29:41,426 - main - INFO - Included router: routers.user.router
2026-05-01 05:29:41,469 - main - INFO - Included router: routers.user_profiles.router
2026-05-01 05:29:41,699 - main - INFO - Included router: routers.user_roles.router
2026-05-01 05:29:41,788 - main - INFO - Included router: routers.whmcs.router
2026-05-01 05:29:41,849 - main - INFO - Included router: routers.whmcs_admin.router
2026-05-01 05:29:41,895 - main - INFO - Included router: routers.whmcs_extra.router
2026-05-01 05:29:41,897 - main - INFO - === Application startup initiated ===
2026-05-01 05:29:41,898 - services.database - INFO - Ignore creating tables
2026-05-01 05:29:41,898 - services.mock_data - INFO - Ignore initialize data
2026-05-01 05:29:41,898 - services.auth - INFO - Ignore initialize admin
2026-05-01 05:29:41,898 - main - INFO - === Application startup completed successfully ===
2026-05-01 05:29:49,876 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-05-01 05:29:49,881 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 05:29:49,881 - core.database - WARNING - Database session maker not available, attempting lazy initialization...
2026-05-01 05:29:49,882 - core.database - WARNING - Database not initialized, attempting lazy initialization...
2026-05-01 05:29:49,883 - core.database - INFO - Starting database initialization...
2026-05-01 05:29:49,883 - core.config - DEBUG - Read dynamic attribute database_url from environment variable DATABASE_URL
2026-05-01 05:29:49,884 - core.database - INFO - Normalizing database URL for async compatibility...
2026-05-01 05:29:49,887 - core.database - INFO - Creating async database engine...
2026-05-01 05:29:49,887 - core.database - INFO - Using QueuePool with connection pooling for non-Lambda environment
2026-05-01 05:29:50,050 - core.database - INFO - Database engine created successfully
2026-05-01 05:29:50,050 - core.database - INFO - Creating async session maker...
2026-05-01 05:29:50,050 - core.database - INFO - Async session maker created successfully
2026-05-01 05:29:50,050 - core.database - INFO - Database connection initialized successfully
2026-05-01 05:29:50,051 - core.database - DEBUG - [DB_OP] Starting create_tables
2026-05-01 05:29:50,051 - core.database - INFO - 🔧 Starting table creation...
2026-05-01 05:29:50,057 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 05:29:50,058 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0004s
2026-05-01 05:29:50,064 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-01 05:29:50,064 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0005s
2026-05-01 05:29:50,065 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"general"}, sort=None, skip=0, limit=1, fields=None
2026-05-01 05:29:51,379 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.3214s
2026-05-01 05:29:51,509 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-01 05:29:51,510 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.4459s
2026-05-01 05:29:52,762 - core.database - INFO - Tables initialized successfully
2026-05-01 05:29:52,763 - core.database - DEBUG - [DB_OP] Create tables completed in 2.7121s
2026-05-01 05:29:52,826 - core.database - INFO - Lazy database initialization completed successfully
2026-05-01 05:29:52,827 - core.database - DEBUG - [DB_OP] Database session created successfully in 2.9460s
2026-05-01 05:29:52,827 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"branding"}, sort=None, skip=0, limit=1, fields=None
2026-05-01 05:29:53,398 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-01 05:29:53,398 - core.database - DEBUG - [DB_OP] Database session cleanup after 3.5176s
2026-05-01 05:30:11,256 - services.database - DEBUG - [DB_OP] Starting database close
2026-05-01 05:30:11,454 - core.database - INFO - Database connection closed and engine disposed
2026-05-01 05:30:11,455 - services.database - INFO - Database connections closed
2026-05-01 05:30:11,455 - services.database - DEBUG - [DB_OP] Database close completed in 0.1992s
