user service health
This commit is contained in:
parent
7444e46738
commit
82f747fbab
|
@ -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