refactor(core): Support multiple log scopes (#11318)

This commit is contained in:
Iván Ovejero
2024-10-22 17:20:14 +02:00
committed by GitHub
parent c863abd083
commit 43f31b86aa
16 changed files with 55 additions and 37 deletions

View File

@@ -170,7 +170,7 @@ export class Start extends BaseCommand {
this.logger.info('Initializing n8n process');
if (config.getEnv('executions.mode') === 'queue') {
const scopedLogger = this.logger.withScope('scaling');
const scopedLogger = this.logger.scoped('scaling');
scopedLogger.debug('Starting main instance in scaling mode');
scopedLogger.debug(`Host ID: ${this.instanceSettings.hostId}`);
}
@@ -263,7 +263,7 @@ export class Start extends BaseCommand {
await subscriber.subscribe('n8n.commands');
await subscriber.subscribe('n8n.worker-response');
this.logger.withScope('scaling').debug('Pubsub setup completed');
this.logger.scoped(['scaling', 'pubsub']).debug('Pubsub setup completed');
if (!orchestrationService.isMultiMainSetupEnabled) return;