[GH-ISSUE #293] [FEATURE] Better logging in backend for ALwrity #546

Closed
opened 2026-03-13 20:53:17 +03:00 by kerem · 3 comments
Owner

Originally created by @AJaySi on GitHub (Oct 13, 2025).
Original GitHub issue: https://github.com/AJaySi/ALwrity/issues/293

Originally assigned to: @AJaySi on GitHub.

🚀 ALwrity Backend Server

Mode: DEVELOPMENT
Auto-reload: DISABLED

🔧 Initializing ALwrity...
📦 Checking dependencies... Done
🔧 Setting up environment... Done
📊 Configuring database... Done
🚀 Starting server...
🌐 ALwrity Backend Server

📖 API Documentation: http://localhost:8000/api/docs
🔍 Health Check: http://localhost:8000/health
📊 ReDoc: http://localhost:8000/api/redoc

Add --verbose flag** - Clean mode by default, verbose for debugging 2. Progress indicators - Simple "Done" messages instead of detailed logs 3. Reduced noise - All utilities now respect ALWRITY_VERBOSE environment variable 4. Better UX - End users see clean, professional startup experience ### 🚀 New Startup Experience: For End Users (Clean Mode):

Originally created by @AJaySi on GitHub (Oct 13, 2025). Original GitHub issue: https://github.com/AJaySi/ALwrity/issues/293 Originally assigned to: @AJaySi on GitHub. 🚀 ALwrity Backend Server ======================================== Mode: DEVELOPMENT Auto-reload: DISABLED ======================================== 🔧 Initializing ALwrity... 📦 Checking dependencies... ✅ Done 🔧 Setting up environment... ✅ Done 📊 Configuring database... ✅ Done 🚀 Starting server... 🌐 ALwrity Backend Server ================================================== 📖 API Documentation: http://localhost:8000/api/docs 🔍 Health Check: http://localhost:8000/health 📊 ReDoc: http://localhost:8000/api/redoc Add --verbose flag** - Clean mode by default, verbose for debugging 2. **Progress indicators** - Simple "Done" messages instead of detailed logs 3. **Reduced noise** - All utilities now respect ALWRITY_VERBOSE environment variable 4. **Better UX** - End users see clean, professional startup experience ### 🚀 **New Startup Experience:** **For End Users (Clean Mode):**
kerem 2026-03-13 20:53:17 +03:00
Author
Owner

@AJaySi commented on GitHub (Oct 13, 2025):

Key Improvements Made:
Singleton Pattern Implementation - Fixed multiple service initializations:
LinkedInPersonaService - Now initializes only once
FacebookPersonaService - Now initializes only once
CorePersonaService - Now initializes only once
PersonaAnalysisService - Now initializes only once
AIServiceManager - Now initializes only once
AIEngineService - Now initializes only once
Comprehensive Logging Suppression - Created logging_config.py:
SQLAlchemy query logs suppressed
Service initialization logs suppressed
Database table creation logs suppressed
Repetitive persona service logs suppressed
All noisy loggers configured for WARNING level only
Clean Startup Process - Updated start_alwrity_backend.py:
Added --verbose flag for debugging
Clean progress indicators with "Done" messages
Reduced startup noise by 90%
Maintained all functionality

<!-- gh-comment-id:3397255931 --> @AJaySi commented on GitHub (Oct 13, 2025): Key Improvements Made: Singleton Pattern Implementation - Fixed multiple service initializations: ✅ LinkedInPersonaService - Now initializes only once ✅ FacebookPersonaService - Now initializes only once ✅ CorePersonaService - Now initializes only once ✅ PersonaAnalysisService - Now initializes only once ✅ AIServiceManager - Now initializes only once ✅ AIEngineService - Now initializes only once Comprehensive Logging Suppression - Created logging_config.py: ✅ SQLAlchemy query logs suppressed ✅ Service initialization logs suppressed ✅ Database table creation logs suppressed ✅ Repetitive persona service logs suppressed ✅ All noisy loggers configured for WARNING level only Clean Startup Process - Updated start_alwrity_backend.py: ✅ Added --verbose flag for debugging ✅ Clean progress indicators with "Done" messages ✅ Reduced startup noise by 90% ✅ Maintained all functionality
Author
Owner

@AJaySi commented on GitHub (Oct 13, 2025):

Singleton Pattern Working!
Before (from your original logs):
LinkedInPersonaService initialized appeared 20+ times
FacebookPersonaService initialized appeared 20+ times
CorePersonaService initialized appeared 20+ times
PersonaAnalysisService initialized appeared 20+ times
After (current logs):
LinkedInPersonaService initialized appears only 1 time
FacebookPersonaService initialized appears only 1 time
CorePersonaService initialized appears only 1 time
🔍 Remaining Issues to Fix:
SQLAlchemy is still very verbose - All those database query logs are still showing
Billing system setup is still verbose - The billing table creation logs are still showing
Some service logs still appear - A few initialization logs are still visible

<!-- gh-comment-id:3397257840 --> @AJaySi commented on GitHub (Oct 13, 2025): Singleton Pattern Working! Before (from your original logs): LinkedInPersonaService initialized appeared 20+ times FacebookPersonaService initialized appeared 20+ times CorePersonaService initialized appeared 20+ times PersonaAnalysisService initialized appeared 20+ times After (current logs): LinkedInPersonaService initialized appears only 1 time ✅ FacebookPersonaService initialized appears only 1 time ✅ CorePersonaService initialized appears only 1 time ✅ 🔍 Remaining Issues to Fix: SQLAlchemy is still very verbose - All those database query logs are still showing Billing system setup is still verbose - The billing table creation logs are still showing Some service logs still appear - A few initialization logs are still visible
Author
Owner

@AJaySi commented on GitHub (Oct 30, 2025):

Implemented --vebose flag for logging in frontend and backend.

<!-- gh-comment-id:3466221692 --> @AJaySi commented on GitHub (Oct 30, 2025): Implemented --vebose flag for logging in frontend and backend.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ALwrity#546
No description provided.