refactor(logging): replace console usage with logger
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { logger } from '../services/logging';
|
||||
|
||||
/**
|
||||
* Unified Application Configuration System
|
||||
*
|
||||
@@ -754,10 +756,10 @@ function validateConfig(config: UnifiedConfig): void {
|
||||
|
||||
// Log warnings and throw errors
|
||||
if (warnings.length > 0) {
|
||||
console.warn('⚠️ Configuration warnings:', warnings);
|
||||
logger.warn('Configuration warnings', 'CONFIG', warnings);
|
||||
}
|
||||
if (errors.length > 0) {
|
||||
console.error('❌ Configuration errors:', errors);
|
||||
logger.error('Configuration errors', 'CONFIG', errors);
|
||||
throw new Error(`Configuration validation failed: ${errors.join(', ')}`);
|
||||
}
|
||||
}
|
||||
@@ -956,7 +958,7 @@ export function exportAsEnvVars(
|
||||
*/
|
||||
export function logConfig(): void {
|
||||
if (unifiedConfig.features.debugMode) {
|
||||
console.warn('🔧 Unified Configuration (Single Source of Truth):', {
|
||||
logger.info('Unified Configuration (Single Source of Truth)', 'CONFIG', {
|
||||
environment: unifiedConfig.app.environment,
|
||||
app: unifiedConfig.app.name,
|
||||
version: unifiedConfig.app.version,
|
||||
|
||||
Reference in New Issue
Block a user