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:
@@ -1,9 +1,10 @@
|
||||
import app from './app.js';
|
||||
import { startAllCronJobs } from './cron/index.js';
|
||||
import { logger } from './utils/logger.js';
|
||||
|
||||
const port = process.env.PORT || 5000;
|
||||
app.listen(port, () => {
|
||||
console.log(`🚀 Server running on http://localhost:${port}`);
|
||||
logger.info(`Server running on http://localhost:${port}`);
|
||||
|
||||
// Start cron jobs after server is running
|
||||
startAllCronJobs();
|
||||
|
||||
Reference in New Issue
Block a user