mirror of
https://gitlab.com/mobicoop/v3/service/logger.git
synced 2026-01-11 13:52:39 +00:00
ad crit logger
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user