Merge branch 'authhealthlog' into 'main'
add health log for services See merge request v3/service/logger!15
This commit is contained in:
commit
cb5d24df61
|
@ -54,6 +54,10 @@ import { AdminApiController } from './logger/adapters/primaries/admin-api.contro
|
||||||
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
||||||
routingKey: 'logging.auth.username.update.warning',
|
routingKey: 'logging.auth.username.update.warning',
|
||||||
},
|
},
|
||||||
|
loggingAuthHealthCrit: {
|
||||||
|
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
||||||
|
routingKey: 'logging.auth.health.crit',
|
||||||
|
},
|
||||||
loggingConfigurationCreateInfo: {
|
loggingConfigurationCreateInfo: {
|
||||||
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
||||||
routingKey: 'logging.configuration.create.info',
|
routingKey: 'logging.configuration.create.info',
|
||||||
|
@ -86,6 +90,10 @@ import { AdminApiController } from './logger/adapters/primaries/admin-api.contro
|
||||||
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
||||||
routingKey: 'logging.configuration.update.crit',
|
routingKey: 'logging.configuration.update.crit',
|
||||||
},
|
},
|
||||||
|
loggingConfigurationHealthCrit: {
|
||||||
|
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
||||||
|
routingKey: 'logging.configuration.health.crit',
|
||||||
|
},
|
||||||
loggingTerritoryCreateInfo: {
|
loggingTerritoryCreateInfo: {
|
||||||
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
||||||
routingKey: 'logging.territory.create.info',
|
routingKey: 'logging.territory.create.info',
|
||||||
|
@ -118,6 +126,10 @@ import { AdminApiController } from './logger/adapters/primaries/admin-api.contro
|
||||||
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
||||||
routingKey: 'logging.territory.update.crit',
|
routingKey: 'logging.territory.update.crit',
|
||||||
},
|
},
|
||||||
|
loggingTerritoryHealthCrit: {
|
||||||
|
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
||||||
|
routingKey: 'logging.territory.health.crit',
|
||||||
|
},
|
||||||
loggingUserCreateInfo: {
|
loggingUserCreateInfo: {
|
||||||
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
||||||
routingKey: 'logging.user.create.info',
|
routingKey: 'logging.user.create.info',
|
||||||
|
|
|
@ -15,7 +15,6 @@ export class AdminApiController {
|
||||||
name: 'loggingAdminApiHealthCrit',
|
name: 'loggingAdminApiHealthCrit',
|
||||||
})
|
})
|
||||||
public async adminApiHealthCriticalHandler(message: string) {
|
public async adminApiHealthCriticalHandler(message: string) {
|
||||||
console.log('ici');
|
|
||||||
this.logger.configure(
|
this.logger.configure(
|
||||||
loggerOptions('admin-api', level.crit, 'crit', 'health'),
|
loggerOptions('admin-api', level.crit, 'crit', 'health'),
|
||||||
);
|
);
|
||||||
|
|
|
@ -70,4 +70,14 @@ export class AuthController {
|
||||||
);
|
);
|
||||||
this.logger.warning(JSON.parse(message));
|
this.logger.warning(JSON.parse(message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RabbitSubscribe({
|
||||||
|
name: 'loggingAuthHealthCrit',
|
||||||
|
})
|
||||||
|
public async authHealthCriticalHandler(message: string) {
|
||||||
|
this.logger.configure(
|
||||||
|
loggerOptions('auth', level.crit, 'critical', 'health'),
|
||||||
|
);
|
||||||
|
this.logger.crit(JSON.parse(message));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,4 +90,14 @@ export class ConfigurationController {
|
||||||
);
|
);
|
||||||
this.logger.crit(JSON.parse(message));
|
this.logger.crit(JSON.parse(message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RabbitSubscribe({
|
||||||
|
name: 'loggingConfigurationHealthCrit',
|
||||||
|
})
|
||||||
|
public async configurationHealthCriticalHandler(message: string) {
|
||||||
|
this.logger.configure(
|
||||||
|
loggerOptions('configuration', level.crit, 'critical', 'health'),
|
||||||
|
);
|
||||||
|
this.logger.crit(JSON.parse(message));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,4 +90,14 @@ export class TerritoryController {
|
||||||
);
|
);
|
||||||
this.logger.crit(JSON.parse(message));
|
this.logger.crit(JSON.parse(message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RabbitSubscribe({
|
||||||
|
name: 'loggingTerritoryHealthCrit',
|
||||||
|
})
|
||||||
|
public async territoryHealthCriticalHandler(message: string) {
|
||||||
|
this.logger.configure(
|
||||||
|
loggerOptions('territory', level.crit, 'critical', 'health'),
|
||||||
|
);
|
||||||
|
this.logger.crit(JSON.parse(message));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue