refactor: Clean up logging system with LOG_LEVEL filtering
- Add LOG_LEVEL env variable support (debug, info, warn, error) - Default to 'info' level for production-ready logs - Integrate Morgan HTTP logging with custom logger - Remove console.logs and replace with custom logger - Remove sensitive password debug logs from email service - Remove noisy warn logs from email sync and event notifier - Add gray color for timestamps to improve readability 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,9 +15,9 @@ const pool = new Pool({
|
||||
connectionTimeoutMillis: 2000,
|
||||
});
|
||||
|
||||
// Note: Connection logging handled in index.js to avoid circular dependencies
|
||||
// Critical database errors - use console.error directly to avoid circular imports
|
||||
pool.on('error', (err) => {
|
||||
console.error('Neočakávaná chyba databázy:', err);
|
||||
console.error('[FATAL] Database connection error:', err.message);
|
||||
process.exit(-1);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user