2026-05-02 08:52:57,342 - main - INFO - === Logging system initialized ===
2026-05-02 08:52:57,342 - main - INFO - Log file: logs/app_20260502_085257.log
2026-05-02 08:52:57,342 - main - INFO - Log level: INFO
2026-05-02 08:52:57,342 - main - INFO - Timestamp: 20260502_085257
2026-05-02 08:52:57,408 - main - INFO - Included router: routers.admin_dashboard.router
2026-05-02 08:52:57,450 - main - INFO - Included router: routers.agent_availability.router
2026-05-02 08:52:58,283 - main - INFO - Included router: routers.ai_ticket_summary.router
2026-05-02 08:52:58,306 - main - INFO - Included router: routers.aihub.router
2026-05-02 08:52:58,321 - main - INFO - Included router: routers.auth.router
2026-05-02 08:52:58,379 - main - INFO - Included router: routers.carts.router
2026-05-02 08:52:58,433 - main - INFO - Included router: routers.chat_analytics_daily.router
2026-05-02 08:52:58,484 - main - INFO - Included router: routers.chat_attachments.router
2026-05-02 08:52:58,559 - main - INFO - Included router: routers.chat_branding.router
2026-05-02 08:52:58,575 - main - INFO - Included router: routers.chat_branding_api.router
2026-05-02 08:52:58,722 - main - INFO - Included router: routers.chat_conversations.router
2026-05-02 08:52:58,791 - main - INFO - Included router: routers.chat_messages.router
2026-05-02 08:52:58,842 - main - INFO - Included router: routers.chat_routing_rules.router
2026-05-02 08:52:58,871 - main - INFO - Included router: routers.contact.router
2026-05-02 08:52:58,914 - main - INFO - Included router: routers.contact_inquiries.router
2026-05-02 08:52:58,977 - main - INFO - Included router: routers.ecom_checkout.router
2026-05-02 08:52:58,979 - main - INFO - Included router: routers.health.router
2026-05-02 08:52:59,034 - main - INFO - Included router: routers.kb_article_feedback.router
2026-05-02 08:52:59,087 - main - INFO - Included router: routers.kb_articles.router
2026-05-02 08:52:59,147 - main - INFO - Included router: routers.notification_preferences.router
2026-05-02 08:52:59,201 - main - INFO - Included router: routers.notifications.router
2026-05-02 08:52:59,206 - main - INFO - Included router: routers.notifications_extras.router
2026-05-02 08:52:59,313 - main - INFO - Included router: routers.oauth.router
2026-05-02 08:52:59,375 - main - INFO - Included router: routers.order_items.router
2026-05-02 08:52:59,548 - main - INFO - Included router: routers.orders.router
2026-05-02 08:52:59,605 - main - INFO - Included router: routers.plans.router
2026-05-02 08:52:59,655 - main - INFO - Included router: routers.product_categories.router
2026-05-02 08:52:59,711 - main - INFO - Included router: routers.product_reviews.router
2026-05-02 08:52:59,782 - main - INFO - Included router: routers.products.router
2026-05-02 08:52:59,833 - main - INFO - Included router: routers.role_management.router
2026-05-02 08:52:59,899 - main - INFO - Included router: routers.service_testimonials.router
2026-05-02 08:52:59,929 - main - INFO - Included router: routers.settings.router
2026-05-02 08:52:59,979 - main - INFO - Included router: routers.site_settings.router
2026-05-02 08:53:00,099 - main - INFO - Included router: routers.smtp_settings.router
2026-05-02 08:53:00,146 - main - INFO - Included router: routers.storage.router
2026-05-02 08:53:00,279 - main - INFO - Included router: routers.support_chat.router
2026-05-02 08:53:00,332 - main - INFO - Included router: routers.support_departments.router
2026-05-02 08:53:00,567 - main - INFO - Included router: routers.support_seats.router
2026-05-02 08:53:00,596 - main - INFO - Included router: routers.ticket_notifications_sync.router
2026-05-02 08:53:00,644 - main - INFO - Included router: routers.ticket_summaries.router
2026-05-02 08:53:00,706 - main - INFO - Included router: routers.ticket_sync_states.router
2026-05-02 08:53:00,717 - main - INFO - Included router: routers.user.router
2026-05-02 08:53:00,773 - main - INFO - Included router: routers.user_profiles.router
2026-05-02 08:53:00,821 - main - INFO - Included router: routers.user_roles.router
2026-05-02 08:53:00,843 - main - INFO - Included router: routers.whmcs.router
2026-05-02 08:53:00,918 - main - INFO - Included router: routers.whmcs_admin.router
2026-05-02 08:53:00,961 - main - INFO - Included router: routers.whmcs_extra.router
2026-05-02 08:53:00,964 - main - INFO - === Application startup initiated ===
2026-05-02 08:53:00,964 - services.database - INFO - Ignore creating tables
2026-05-02 08:53:00,965 - services.mock_data - INFO - Ignore initialize data
2026-05-02 08:53:00,965 - services.auth - INFO - Ignore initialize admin
2026-05-02 08:53:00,965 - main - INFO - === Application startup completed successfully ===
2026-05-02 08:53:27,046 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 08:53:27,046 - core.database - WARNING - Database session maker not available, attempting lazy initialization...
2026-05-02 08:53:27,047 - core.database - WARNING - Database not initialized, attempting lazy initialization...
2026-05-02 08:53:27,047 - core.database - INFO - Starting database initialization...
2026-05-02 08:53:27,047 - core.config - DEBUG - Read dynamic attribute database_url from environment variable DATABASE_URL
2026-05-02 08:53:27,047 - core.database - INFO - Normalizing database URL for async compatibility...
2026-05-02 08:53:27,048 - core.database - INFO - Creating async database engine...
2026-05-02 08:53:27,049 - core.database - INFO - Using QueuePool with connection pooling for non-Lambda environment
2026-05-02 08:53:27,111 - core.database - INFO - Database engine created successfully
2026-05-02 08:53:27,112 - core.database - INFO - Creating async session maker...
2026-05-02 08:53:27,112 - core.database - INFO - Async session maker created successfully
2026-05-02 08:53:27,112 - core.database - INFO - Database connection initialized successfully
2026-05-02 08:53:27,112 - core.database - DEBUG - [DB_OP] Starting create_tables
2026-05-02 08:53:27,113 - core.database - INFO - 🔧 Starting table creation...
2026-05-02 08:53:27,120 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 08:53:27,121 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0004s
2026-05-02 08:53:27,121 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"branding"}, sort=None, skip=0, limit=1, fields=None
2026-05-02 08:53:27,130 - dependencies.auth - DEBUG - Authentication required for request GET /api/v1/auth/me
2026-05-02 08:53:27,132 - core.database - DEBUG - [DB_OP] Starting get_db session creation
2026-05-02 08:53:27,133 - core.database - DEBUG - [DB_OP] Database session created successfully in 0.0004s
2026-05-02 08:53:27,133 - routers.site_settings - DEBUG - Querying site_settingss: query={"key":"general"}, sort=None, skip=0, limit=1, fields=None
2026-05-02 08:53:28,542 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-02 08:53:28,543 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.4104s
2026-05-02 08:53:28,544 - routers.site_settings - DEBUG - Found 0 site_settingss
2026-05-02 08:53:28,544 - core.database - DEBUG - [DB_OP] Database session cleanup after 1.4243s
2026-05-02 08:53:30,437 - core.database - INFO - Tables initialized successfully
2026-05-02 08:53:30,437 - core.database - DEBUG - [DB_OP] Create tables completed in 3.3249s
2026-05-02 08:53:30,501 - core.database - INFO - Lazy database initialization completed successfully
2026-05-02 08:53:30,502 - core.database - DEBUG - [DB_OP] Database session created successfully in 3.4555s
2026-05-02 08:53:30,951 - core.database - DEBUG - [DB_OP] Database session cleanup after 3.9048s
2026-05-02 08:53:31,063 - services.database - DEBUG - [DB_OP] Starting database close
2026-05-02 08:53:31,262 - core.database - INFO - Database connection closed and engine disposed
2026-05-02 08:53:31,263 - services.database - INFO - Database connections closed
2026-05-02 08:53:31,263 - services.database - DEBUG - [DB_OP] Database close completed in 0.2002s
