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,6 +1,7 @@
|
||||
import { db } from '../../config/database.js';
|
||||
import { companyUsers, projectUsers, todoUsers } from '../../db/schema.js';
|
||||
import { eq, and } from 'drizzle-orm';
|
||||
import { logger } from '../../utils/logger.js';
|
||||
|
||||
/**
|
||||
* Univerzálny middleware pre kontrolu prístupu k resources
|
||||
@@ -104,7 +105,7 @@ export const checkResourceAccess = (resourceType, paramName) => {
|
||||
|
||||
next();
|
||||
} catch (error) {
|
||||
console.error('Resource access check error:', error);
|
||||
logger.error('Resource access check error', error);
|
||||
return res.status(500).json({
|
||||
success: false,
|
||||
error: {
|
||||
|
||||
Reference in New Issue
Block a user