Merge branch 'userHealth' into 'main'
user service health See merge request v3/service/logger!14
This commit is contained in:
commit
404ac0d61a
|
@ -150,6 +150,10 @@ import { AdminApiController } from './logger/adapters/primaries/admin-api.contro
|
||||||
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
||||||
routingKey: 'logging.user.update.crit',
|
routingKey: 'logging.user.update.crit',
|
||||||
},
|
},
|
||||||
|
loggingUserHealthCrit: {
|
||||||
|
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
||||||
|
routingKey: 'logging.user.health.crit',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
uri: configService.get<string>('RMQ_URI'),
|
uri: configService.get<string>('RMQ_URI'),
|
||||||
connectionInitOptions: { wait: false },
|
connectionInitOptions: { wait: false },
|
||||||
|
|
|
@ -84,4 +84,14 @@ export class UserController {
|
||||||
);
|
);
|
||||||
this.logger.crit(JSON.parse(message));
|
this.logger.crit(JSON.parse(message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RabbitSubscribe({
|
||||||
|
name: 'loggingUserHealthCrit',
|
||||||
|
})
|
||||||
|
public async userHealthCriticalHandler(message: string) {
|
||||||
|
this.logger.configure(
|
||||||
|
loggerOptions('user', level.crit, 'critical', 'health'),
|
||||||
|
);
|
||||||
|
this.logger.crit(JSON.parse(message));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue