ad crit logger

This commit is contained in:
sbriat 2023-04-28 15:54:37 +02:00
parent 4667185a91
commit 72fda86dc9
2 changed files with 14 additions and 0 deletions

View File

@ -95,6 +95,10 @@ import { MatcherController } from './logger/adapters/primaries/matcher.controlle
exchange: configService.get<string>('RMQ_EXCHANGE'),
routingKey: 'logging.configuration.health.crit',
},
loggingMatcherAdCrit: {
exchange: configService.get<string>('RMQ_EXCHANGE'),
routingKey: 'logging.matcher.ad.crit',
},
loggingMatcherMatchCrit: {
exchange: configService.get<string>('RMQ_EXCHANGE'),
routingKey: 'logging.matcher.match.crit',

View File

@ -11,6 +11,16 @@ export class MatcherController {
@Inject(WINSTON_MODULE_PROVIDER) private readonly logger: Logger,
) {}
@RabbitSubscribe({
name: 'loggingMatcherAdCrit',
})
public async matcherAdCriticalHandler(message: string) {
this.logger.configure(
loggerOptions('matcher', level.crit, 'critical', 'ad'),
);
this.logger.crit(JSON.parse(message));
}
@RabbitSubscribe({
name: 'loggingMatcherMatchCrit',
})