update packages, use constants
This commit is contained in:
parent
c0c7d8fe06
commit
e77642667e
|
@ -3,6 +3,7 @@ SERVICE_URL=0.0.0.0
|
|||
SERVICE_PORT=5099
|
||||
HEALTH_SERVICE_PORT=6099
|
||||
|
||||
# RABBIT MQ
|
||||
# MESSAGE BROKER
|
||||
MESSAGE_BROKER_URI=amqp://v3-broker:5672
|
||||
MESSAGE_BROKER_EXCHANGE=mobicoop
|
||||
MESSAGE_BROKER_EXCHANGE_DURABILITY=true
|
||||
|
|
File diff suppressed because it is too large
Load Diff
76
package.json
76
package.json
|
@ -24,48 +24,48 @@
|
|||
"test:e2e": "jest --config ./test/jest-e2e.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@golevelup/nestjs-rabbitmq": "^3.4.0",
|
||||
"@grpc/grpc-js": "^1.8.14",
|
||||
"@grpc/proto-loader": "^0.7.6",
|
||||
"@mobicoop/ddd-library": "^0.3.0",
|
||||
"@mobicoop/health-module": "^2.0.0",
|
||||
"@nestjs/axios": "^2.0.0",
|
||||
"@nestjs/common": "^9.0.0",
|
||||
"@nestjs/config": "^2.2.0",
|
||||
"@nestjs/core": "^9.0.0",
|
||||
"@nestjs/microservices": "^9.2.1",
|
||||
"@nestjs/platform-express": "^9.0.0",
|
||||
"@nestjs/terminus": "^9.2.2",
|
||||
"axios": "^1.3.4",
|
||||
"nest-winston": "^1.8.0",
|
||||
"@golevelup/nestjs-rabbitmq": "^4.0.0",
|
||||
"@grpc/grpc-js": "^1.9.9",
|
||||
"@grpc/proto-loader": "^0.7.10",
|
||||
"@mobicoop/ddd-library": "^2.1.1",
|
||||
"@mobicoop/health-module": "^2.3.1",
|
||||
"@nestjs/axios": "^3.0.1",
|
||||
"@nestjs/common": "^10.2.7",
|
||||
"@nestjs/config": "^3.1.1",
|
||||
"@nestjs/core": "^10.2.7",
|
||||
"@nestjs/microservices": "^10.2.7",
|
||||
"@nestjs/platform-express": "^10.2.7",
|
||||
"@nestjs/terminus": "^10.1.1",
|
||||
"axios": "^1.6.0",
|
||||
"nest-winston": "^1.9.4",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"rimraf": "^3.0.2",
|
||||
"rxjs": "^7.2.0",
|
||||
"winston": "^3.8.2",
|
||||
"rimraf": "^5.0.5",
|
||||
"rxjs": "^7.8.1",
|
||||
"winston": "^3.11.0",
|
||||
"winston-daily-rotate-file": "^4.7.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "^9.0.0",
|
||||
"@nestjs/schematics": "^9.0.0",
|
||||
"@nestjs/testing": "^9.0.0",
|
||||
"@types/express": "^4.17.13",
|
||||
"@types/jest": "28.1.8",
|
||||
"@types/node": "^16.0.0",
|
||||
"@types/supertest": "^2.0.11",
|
||||
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
||||
"@typescript-eslint/parser": "^5.0.0",
|
||||
"eslint": "^8.0.1",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"jest": "28.1.3",
|
||||
"prettier": "^2.3.2",
|
||||
"source-map-support": "^0.5.20",
|
||||
"supertest": "^6.1.3",
|
||||
"ts-jest": "28.0.8",
|
||||
"ts-loader": "^9.2.3",
|
||||
"ts-node": "^10.0.0",
|
||||
"tsconfig-paths": "4.1.0",
|
||||
"typescript": "^4.7.4"
|
||||
"@nestjs/cli": "^10.2.1",
|
||||
"@nestjs/schematics": "^10.0.3",
|
||||
"@nestjs/testing": "^10.2.7",
|
||||
"@types/express": "^4.17.20",
|
||||
"@types/jest": "29.5.7",
|
||||
"@types/node": "^20.8.10",
|
||||
"@types/supertest": "^2.0.15",
|
||||
"@typescript-eslint/eslint-plugin": "^6.9.1",
|
||||
"@typescript-eslint/parser": "^6.9.1",
|
||||
"eslint": "^8.52.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"eslint-plugin-prettier": "^5.0.1",
|
||||
"jest": "29.7.0",
|
||||
"prettier": "^3.0.3",
|
||||
"source-map-support": "^0.5.21",
|
||||
"supertest": "^6.3.3",
|
||||
"ts-jest": "29.1.1",
|
||||
"ts-loader": "^9.5.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsconfig-paths": "4.2.0",
|
||||
"typescript": "^5.2.2"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
|
|
@ -0,0 +1,215 @@
|
|||
// service
|
||||
export const SERVICE_NAME = 'logger';
|
||||
|
||||
// health
|
||||
export const GRPC_HEALTH_PACKAGE_NAME = 'health';
|
||||
|
||||
// messaging
|
||||
export const GATEWAY_API_HEALTH_CRIT_MESSAGE_HANDLER =
|
||||
'loggingGatewayApiHealthCrit';
|
||||
export const GATEWAY_API_HEALTH_CRIT_ROUTING_KEY =
|
||||
'logging.gateway-api.health.crit';
|
||||
export const GATEWAY_API_HEALTH_CRIT_QUEUE = 'logging-gateway-api-health-crit';
|
||||
|
||||
export const ADMIN_API_HEALTH_CRIT_MESSAGE_HANDLER =
|
||||
'loggingAdminApiHealthCrit';
|
||||
export const ADMIN_API_HEALTH_CRIT_ROUTING_KEY =
|
||||
'logging.admin-api.health.crit';
|
||||
export const ADMIN_API_HEALTH_CRIT_QUEUE = 'logging-admin-api-health-crit';
|
||||
|
||||
export const AD_CREATED_INFO_MESSAGE_HANDLER = 'loggingAdCreatedInfo';
|
||||
export const AD_CREATED_INFO_ROUTING_KEY = 'logging.ad.created.info';
|
||||
export const AD_CREATED_INFO_QUEUE = 'logging-ad-created-info';
|
||||
|
||||
export const AD_CREATED_WARNING_MESSAGE_HANDLER = 'loggingAdCreatedWarning';
|
||||
export const AD_CREATED_WARNING_ROUTING_KEY = 'logging.ad.created.warning';
|
||||
export const AD_CREATED_WARNING_QUEUE = 'logging-ad-created-warning';
|
||||
|
||||
export const AD_CREATED_CRIT_MESSAGE_HANDLER = 'loggingAdCreatedCrit';
|
||||
export const AD_CREATED_CRIT_ROUTING_KEY = 'logging.ad.created.crit';
|
||||
export const AD_CREATED_CRIT_QUEUE = 'logging-ad-created-crit';
|
||||
|
||||
export const AD_DELETED_INFO_MESSAGE_HANDLER = 'loggingAdDeletedInfo';
|
||||
export const AD_DELETED_INFO_ROUTING_KEY = 'logging.ad.deleted.info';
|
||||
export const AD_DELETED_INFO_QUEUE = 'logging-ad-deleted-info';
|
||||
|
||||
export const AD_DELETED_CRIT_MESSAGE_HANDLER = 'loggingAdDeletedCrit';
|
||||
export const AD_DELETED_CRIT_ROUTING_KEY = 'logging.ad.deleted.crit';
|
||||
export const AD_DELETED_CRIT_QUEUE = 'logging-ad-deleted-crit';
|
||||
|
||||
export const AD_READ_WARNING_MESSAGE_HANDLER = 'loggingAdReadWarning';
|
||||
export const AD_READ_WARNING_ROUTING_KEY = 'logging.ad.read.warning';
|
||||
export const AD_READ_WARNING_QUEUE = 'logging-ad-read-warning';
|
||||
|
||||
export const AD_UPDATED_INFO_MESSAGE_HANDLER = 'loggingAdUpdatedInfo';
|
||||
export const AD_UPDATED_INFO_ROUTING_KEY = 'logging.ad.updated.info';
|
||||
export const AD_UPDATED_INFO_QUEUE = 'logging-ad-updated-info';
|
||||
|
||||
export const AD_UPDATED_CRIT_MESSAGE_HANDLER = 'loggingAdUpdatedCrit';
|
||||
export const AD_UPDATED_CRIT_ROUTING_KEY = 'logging.ad.updated.crit';
|
||||
export const AD_UPDATED_CRIT_QUEUE = 'logging-ad-updated-crit';
|
||||
|
||||
export const AD_HEALTH_CRIT_MESSAGE_HANDLER = 'loggingAdHealthCrit';
|
||||
export const AD_HEALTH_CRIT_ROUTING_KEY = 'logging.ad.health.crit';
|
||||
export const AD_HEALTH_CRIT_QUEUE = 'logging-ad-health-crit';
|
||||
|
||||
export const AUTH_CREATED_CRIT_MESSAGE_HANDLER = 'loggingAuthCreatedCrit';
|
||||
export const AUTH_CREATED_CRIT_ROUTING_KEY = 'logging.auth.created.crit';
|
||||
export const AUTH_CREATED_CRIT_QUEUE = 'logging-auth-created-crit';
|
||||
|
||||
export const AUTH_DELETED_CRIT_MESSAGE_HANDLER = 'loggingAuthDeletedCrit';
|
||||
export const AUTH_DELETED_CRIT_ROUTING_KEY = 'logging.auth.deleted.crit';
|
||||
export const AUTH_DELETED_CRIT_QUEUE = 'logging-auth-deleted-crit';
|
||||
|
||||
export const AUTH_READ_WARNING_MESSAGE_HANDLER = 'loggingAuthReadWarning';
|
||||
export const AUTH_READ_WARNING_ROUTING_KEY = 'logging.auth.read.warning';
|
||||
export const AUTH_READ_WARNING_QUEUE = 'logging-auth-read-warning';
|
||||
|
||||
export const AUTH_USERNAME_CREATED_WARNING_MESSAGE_HANDLER =
|
||||
'loggingAuthUsernameCreatedWarning';
|
||||
export const AUTH_USERNAME_CREATED_WARNING_ROUTING_KEY =
|
||||
'logging.auth.username.created.warning';
|
||||
export const AUTH_USERNAME_CREATED_WARNING_QUEUE =
|
||||
'logging-auth-username-created-warning';
|
||||
|
||||
export const AUTH_USERNAME_DELETED_WARNING_MESSAGE_HANDLER =
|
||||
'loggingAuthUsernameDeletedWarning';
|
||||
export const AUTH_USERNAME_DELETED_WARNING_ROUTING_KEY =
|
||||
'logging.auth.username.deleted.warning';
|
||||
export const AUTH_USERNAME_DELETED_WARNING_QUEUE =
|
||||
'logging-auth-username-deleted-warning';
|
||||
|
||||
export const AUTH_USERNAME_READ_WARNING_MESSAGE_HANDLER =
|
||||
'loggingAuthUsernameReadWarning';
|
||||
export const AUTH_USERNAME_READ_WARNING_ROUTING_KEY =
|
||||
'logging.auth.username.read.warning';
|
||||
export const AUTH_USERNAME_READ_WARNING_QUEUE =
|
||||
'logging-auth-username-read-warning';
|
||||
|
||||
export const AUTH_PASSWORD_UPDATED_WARNING_MESSAGE_HANDLER =
|
||||
'loggingAuthPasswordUpdatedWarning';
|
||||
export const AUTH_PASSWORD_UPDATED_WARNING_ROUTING_KEY =
|
||||
'logging.auth.password.updated.warning';
|
||||
export const AUTH_PASSWORD_UPDATED_WARNING_QUEUE =
|
||||
'logging-auth-password-updated-warning';
|
||||
|
||||
export const AUTH_USERNAME_UPDATED_WARNING_MESSAGE_HANDLER =
|
||||
'loggingAuthUsernameUpdatedWarning';
|
||||
export const AUTH_USERNAME_UPDATED_WARNING_ROUTING_KEY =
|
||||
'logging.auth.username.updated.warning';
|
||||
export const AUTH_USERNAME_UPDATED_WARNING_QUEUE =
|
||||
'logging-auth-username-updated-warning';
|
||||
|
||||
export const AUTH_HEALTH_CRIT_MESSAGE_HANDLER = 'loggingAuthHealthCrit';
|
||||
export const AUTH_HEALTH_CRIT_ROUTING_KEY = 'logging.auth.health.crit';
|
||||
export const AUTH_HEALTH_CRIT_QUEUE = 'logging-auth-health-crit';
|
||||
|
||||
export const CONFIGURATION_HEALTH_CRIT_MESSAGE_HANDLER =
|
||||
'loggingConfigurationHealthCrit';
|
||||
export const CONFIGURATION_HEALTH_CRIT_ROUTING_KEY =
|
||||
'logging.configuration.health.crit';
|
||||
export const CONFIGURATION_HEALTH_CRIT_QUEUE =
|
||||
'logging-configuration-health-crit';
|
||||
|
||||
export const LOGGER_HEALTH_CRIT_MESSAGE_HANDLER = 'loggingLoggerHealthCrit';
|
||||
export const LOGGER_HEALTH_CRIT_ROUTING_KEY = 'logging.logger.health.crit';
|
||||
export const LOGGER_HEALTH_CRIT_QUEUE = 'logging-logger-health-crit';
|
||||
|
||||
export const MATCHER_AD_CRIT_MESSAGE_HANDLER = 'loggingMatcherAdCrit';
|
||||
export const MATCHER_AD_CRIT_ROUTING_KEY = 'logging.matcher.ad.crit';
|
||||
export const MATCHER_AD_CRIT_QUEUE = 'logging-matcher-ad-crit';
|
||||
|
||||
export const MATCHER_MATCH_CRIT_MESSAGE_HANDLER = 'loggingMatcherMatchCrit';
|
||||
export const MATCHER_MATCH_CRIT_ROUTING_KEY = 'logging.matcher.match.crit';
|
||||
export const MATCHER_MATCH_CRIT_QUEUE = 'logging-matcher-match-crit';
|
||||
|
||||
export const TERRITORY_CREATED_INFO_MESSAGE_HANDLER =
|
||||
'loggingTerritoryCreatedInfo';
|
||||
export const TERRITORY_CREATED_INFO_ROUTING_KEY =
|
||||
'logging.territory.created.info';
|
||||
export const TERRITORY_CREATED_INFO_QUEUE = 'logging-territory-created-info';
|
||||
|
||||
export const TERRITORY_CREATED_WARNING_MESSAGE_HANDLER =
|
||||
'loggingTerritoryCreatedWarning';
|
||||
export const TERRITORY_CREATED_WARNING_ROUTING_KEY =
|
||||
'logging.territory.created.warning';
|
||||
export const TERRITORY_CREATED_WARNING_QUEUE =
|
||||
'logging-territory-created-warning';
|
||||
|
||||
export const TERRITORY_CREATED_CRIT_MESSAGE_HANDLER =
|
||||
'loggingTerritoryCreatedCrit';
|
||||
export const TERRITORY_CREATED_CRIT_ROUTING_KEY =
|
||||
'logging.territory.created.crit';
|
||||
export const TERRITORY_CREATED_CRIT_QUEUE = 'logging-territory-created-crit';
|
||||
|
||||
export const TERRITORY_DELETED_INFO_MESSAGE_HANDLER =
|
||||
'loggingTerritoryDeletedInfo';
|
||||
export const TERRITORY_DELETED_INFO_ROUTING_KEY =
|
||||
'logging.territory.deleted.info';
|
||||
export const TERRITORY_DELETED_INFO_QUEUE = 'logging-territory-deleted-info';
|
||||
|
||||
export const TERRITORY_DELETED_CRIT_MESSAGE_HANDLER =
|
||||
'loggingTerritoryDeletedCrit';
|
||||
export const TERRITORY_DELETED_CRIT_ROUTING_KEY =
|
||||
'logging.territory.deleted.crit';
|
||||
export const TERRITORY_DELETED_CRIT_QUEUE = 'logging-territory-deleted-crit';
|
||||
|
||||
export const TERRITORY_READ_WARNING_MESSAGE_HANDLER =
|
||||
'loggingTerritoryReadWarning';
|
||||
export const TERRITORY_READ_WARNING_ROUTING_KEY =
|
||||
'logging.territory.read.warning';
|
||||
export const TERRITORY_READ_WARNING_QUEUE = 'logging-territory-read-warning';
|
||||
|
||||
export const TERRITORY_UPDATED_INFO_MESSAGE_HANDLER =
|
||||
'loggingTerritoryUpdatedInfo';
|
||||
export const TERRITORY_UPDATED_INFO_ROUTING_KEY =
|
||||
'logging.territory.updated.info';
|
||||
export const TERRITORY_UPDATED_INFO_QUEUE = 'logging-territory-updated-info';
|
||||
|
||||
export const TERRITORY_UPDATED_CRIT_MESSAGE_HANDLER =
|
||||
'loggingTerritoryUpdatedCrit';
|
||||
export const TERRITORY_UPDATED_CRIT_ROUTING_KEY =
|
||||
'logging.territory.updated.crit';
|
||||
export const TERRITORY_UPDATED_CRIT_QUEUE = 'logging-territory-updated-crit';
|
||||
|
||||
export const TERRITORY_HEALTH_CRIT_MESSAGE_HANDLER =
|
||||
'loggingTerritoryHealthCrit';
|
||||
export const TERRITORY_HEALTH_CRIT_ROUTING_KEY =
|
||||
'logging.territory.health.crit';
|
||||
export const TERRITORY_HEALTH_CRIT_QUEUE = 'logging-territory-health-crit';
|
||||
|
||||
export const USER_CREATED_INFO_MESSAGE_HANDLER = 'loggingUserCreatedInfo';
|
||||
export const USER_CREATED_INFO_ROUTING_KEY = 'logging.user.created.info';
|
||||
export const USER_CREATED_INFO_QUEUE = 'logging-user-created-info';
|
||||
|
||||
export const USER_CREATED_WARNING_MESSAGE_HANDLER = 'loggingUserCreatedWarning';
|
||||
export const USER_CREATED_WARNING_ROUTING_KEY = 'logging.user.created.warning';
|
||||
export const USER_CREATED_WARNING_QUEUE = 'logging-user-created-warning';
|
||||
|
||||
export const USER_CREATED_CRIT_MESSAGE_HANDLER = 'loggingUserCreatedCrit';
|
||||
export const USER_CREATED_CRIT_ROUTING_KEY = 'logging.user.created.crit';
|
||||
export const USER_CREATED_CRIT_QUEUE = 'logging-user-created-crit';
|
||||
|
||||
export const USER_DELETED_INFO_MESSAGE_HANDLER = 'loggingUserDeletedInfo';
|
||||
export const USER_DELETED_INFO_ROUTING_KEY = 'logging.user.deleted.info';
|
||||
export const USER_DELETED_INFO_QUEUE = 'logging-user-deleted-info';
|
||||
|
||||
export const USER_DELETED_CRIT_MESSAGE_HANDLER = 'loggingUserDeletedCrit';
|
||||
export const USER_DELETED_CRIT_ROUTING_KEY = 'logging.user.deleted.crit';
|
||||
export const USER_DELETED_CRIT_QUEUE = 'logging-user-deleted-crit';
|
||||
|
||||
export const USER_READ_WARNING_MESSAGE_HANDLER = 'loggingUserReadWarning';
|
||||
export const USER_READ_WARNING_ROUTING_KEY = 'logging.user.read.warning';
|
||||
export const USER_READ_WARNING_QUEUE = 'logging-user-read-warning';
|
||||
|
||||
export const USER_UPDATED_INFO_MESSAGE_HANDLER = 'loggingUserUpdatedInfo';
|
||||
export const USER_UPDATED_INFO_ROUTING_KEY = 'logging.user.updated.info';
|
||||
export const USER_UPDATED_INFO_QUEUE = 'logging-user-updated-info';
|
||||
|
||||
export const USER_UPDATED_CRIT_MESSAGE_HANDLER = 'loggingUserUpdatedCrit';
|
||||
export const USER_UPDATED_CRIT_ROUTING_KEY = 'logging.user.updated.crit';
|
||||
export const USER_UPDATED_CRIT_QUEUE = 'logging-user-updated-crit';
|
||||
|
||||
export const USER_HEALTH_CRIT_MESSAGE_HANDLER = 'loggingUserHealthCrit';
|
||||
export const USER_HEALTH_CRIT_ROUTING_KEY = 'logging.user.health.crit';
|
||||
export const USER_HEALTH_CRIT_QUEUE = 'logging-user-health-crit';
|
|
@ -6,6 +6,7 @@ import { MessagerModule } from '@modules/messager/messager.module';
|
|||
import { HttpModule } from '@nestjs/axios';
|
||||
import { Module } from '@nestjs/common';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { LOGGER_HEALTH_CRIT_ROUTING_KEY, SERVICE_NAME } from './app.constants';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
|
@ -17,8 +18,8 @@ import { ConfigModule } from '@nestjs/config';
|
|||
useFactory: async (
|
||||
messagePublisher: MessagePublisherPort,
|
||||
): Promise<HealthModuleOptions> => ({
|
||||
serviceName: 'logger',
|
||||
criticalLoggingKey: 'logging.logger.health.crit',
|
||||
serviceName: SERVICE_NAME,
|
||||
criticalLoggingKey: LOGGER_HEALTH_CRIT_ROUTING_KEY,
|
||||
checkUrls: [
|
||||
{
|
||||
name: 'google',
|
||||
|
|
|
@ -2,6 +2,7 @@ import { NestFactory } from '@nestjs/core';
|
|||
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
|
||||
import { join } from 'path';
|
||||
import { AppModule } from './app.module';
|
||||
import { GRPC_HEALTH_PACKAGE_NAME } from './app.constants';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
|
@ -11,14 +12,14 @@ async function bootstrap() {
|
|||
app.connectMicroservice<MicroserviceOptions>({
|
||||
transport: Transport.GRPC,
|
||||
options: {
|
||||
package: ['health'],
|
||||
package: [GRPC_HEALTH_PACKAGE_NAME],
|
||||
protoPath: [join(__dirname, 'health.proto')],
|
||||
url: `${process.env.SERVICE_URL}:${process.env.SERVICE_PORT}`,
|
||||
loader: { keepCase: true },
|
||||
loader: { keepCase: true, enums: String },
|
||||
},
|
||||
});
|
||||
|
||||
await app.startAllMicroservices();
|
||||
await app.listen(process.env.HEALTH_SERVICE_PORT);
|
||||
await app.listen(process.env.HEALTH_SERVICE_PORT as unknown as number);
|
||||
}
|
||||
bootstrap();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as winston from 'winston';
|
||||
|
||||
export default function filter(level) {
|
||||
export default function filter(level: any) {
|
||||
return winston.format((info) => {
|
||||
if (typeof level === 'string') {
|
||||
if (info.level === level) return info;
|
||||
|
|
|
@ -4,6 +4,17 @@ import { WINSTON_MODULE_PROVIDER } from 'nest-winston';
|
|||
import { Logger } from 'winston';
|
||||
import { level } from '../level.enum';
|
||||
import loggerOptions from '../logger.options';
|
||||
import {
|
||||
AD_CREATED_CRIT_MESSAGE_HANDLER,
|
||||
AD_CREATED_INFO_MESSAGE_HANDLER,
|
||||
AD_CREATED_WARNING_MESSAGE_HANDLER,
|
||||
AD_DELETED_CRIT_MESSAGE_HANDLER,
|
||||
AD_DELETED_INFO_MESSAGE_HANDLER,
|
||||
AD_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
AD_READ_WARNING_MESSAGE_HANDLER,
|
||||
AD_UPDATED_CRIT_MESSAGE_HANDLER,
|
||||
AD_UPDATED_INFO_MESSAGE_HANDLER,
|
||||
} from '@src/app.constants';
|
||||
|
||||
export class AdMessageHandler {
|
||||
constructor(
|
||||
|
@ -11,7 +22,7 @@ export class AdMessageHandler {
|
|||
) {}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAdCreatedInfo',
|
||||
name: AD_CREATED_INFO_MESSAGE_HANDLER,
|
||||
})
|
||||
public async adCreatedInfoHandler(message: string) {
|
||||
this.logger.configure(loggerOptions('ad', level.info, 'info', 'created'));
|
||||
|
@ -19,7 +30,7 @@ export class AdMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAdCreatedWarning',
|
||||
name: AD_CREATED_WARNING_MESSAGE_HANDLER,
|
||||
})
|
||||
public async adCreatedWarningHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -29,7 +40,7 @@ export class AdMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAdCreatedCrit',
|
||||
name: AD_CREATED_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async adCreatedCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -39,7 +50,7 @@ export class AdMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAdDeletedInfo',
|
||||
name: AD_DELETED_INFO_MESSAGE_HANDLER,
|
||||
})
|
||||
public async adDeletedInfoHandler(message: string) {
|
||||
this.logger.configure(loggerOptions('ad', level.info, 'info', 'deleted'));
|
||||
|
@ -47,7 +58,7 @@ export class AdMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAdDeletedCrit',
|
||||
name: AD_DELETED_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async adDeletedCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -57,7 +68,7 @@ export class AdMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAdReadWarning',
|
||||
name: AD_READ_WARNING_MESSAGE_HANDLER,
|
||||
})
|
||||
public async adReadWarningHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -67,7 +78,7 @@ export class AdMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAdUpdatedInfo',
|
||||
name: AD_UPDATED_INFO_MESSAGE_HANDLER,
|
||||
})
|
||||
public async adUpdatedInfoHandler(message: string) {
|
||||
this.logger.configure(loggerOptions('ad', level.info, 'info', 'updated'));
|
||||
|
@ -75,7 +86,7 @@ export class AdMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAdUpdatedCrit',
|
||||
name: AD_UPDATED_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async adUpdatedCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -85,7 +96,7 @@ export class AdMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAdHealthCrit',
|
||||
name: AD_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async adHealthCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
|
|
@ -4,6 +4,7 @@ import { WINSTON_MODULE_PROVIDER } from 'nest-winston';
|
|||
import { Logger } from 'winston';
|
||||
import loggerOptions from '../logger.options';
|
||||
import { level } from '../level.enum';
|
||||
import { ADMIN_API_HEALTH_CRIT_MESSAGE_HANDLER } from '@src/app.constants';
|
||||
|
||||
export class AdminApiMessageHandler {
|
||||
constructor(
|
||||
|
@ -11,7 +12,7 @@ export class AdminApiMessageHandler {
|
|||
) {}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAdminApiHealthCrit',
|
||||
name: ADMIN_API_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async adminApiHealthCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
|
|
@ -4,6 +4,17 @@ import { WINSTON_MODULE_PROVIDER } from 'nest-winston';
|
|||
import { Logger } from 'winston';
|
||||
import loggerOptions from '../logger.options';
|
||||
import { level } from '../level.enum';
|
||||
import {
|
||||
AUTH_CREATED_CRIT_MESSAGE_HANDLER,
|
||||
AUTH_DELETED_CRIT_MESSAGE_HANDLER,
|
||||
AUTH_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
AUTH_PASSWORD_UPDATED_WARNING_MESSAGE_HANDLER,
|
||||
AUTH_READ_WARNING_MESSAGE_HANDLER,
|
||||
AUTH_USERNAME_CREATED_WARNING_MESSAGE_HANDLER,
|
||||
AUTH_USERNAME_DELETED_WARNING_MESSAGE_HANDLER,
|
||||
AUTH_USERNAME_READ_WARNING_MESSAGE_HANDLER,
|
||||
AUTH_USERNAME_UPDATED_WARNING_MESSAGE_HANDLER,
|
||||
} from '@src/app.constants';
|
||||
|
||||
export class AuthMessageHandler {
|
||||
constructor(
|
||||
|
@ -11,7 +22,7 @@ export class AuthMessageHandler {
|
|||
) {}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAuthCreatedCrit',
|
||||
name: AUTH_CREATED_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async authCreatedCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -21,7 +32,7 @@ export class AuthMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAuthDeletedCrit',
|
||||
name: AUTH_DELETED_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async authDeletedCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -31,7 +42,7 @@ export class AuthMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAuthReadWarning',
|
||||
name: AUTH_READ_WARNING_MESSAGE_HANDLER,
|
||||
})
|
||||
public async authReadWarningHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -41,7 +52,7 @@ export class AuthMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAuthUsernameCreatedWarning',
|
||||
name: AUTH_USERNAME_CREATED_WARNING_MESSAGE_HANDLER,
|
||||
})
|
||||
public async authUsernameCreatedWarningHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -51,7 +62,7 @@ export class AuthMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAuthUsernameDeletedWarning',
|
||||
name: AUTH_USERNAME_DELETED_WARNING_MESSAGE_HANDLER,
|
||||
})
|
||||
public async authUsernameDeletedWarningHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -61,7 +72,7 @@ export class AuthMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAuthUsernameReadWarning',
|
||||
name: AUTH_USERNAME_READ_WARNING_MESSAGE_HANDLER,
|
||||
})
|
||||
public async authUsernameReadWarningHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -71,7 +82,7 @@ export class AuthMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAuthPasswordUpdatedWarning',
|
||||
name: AUTH_PASSWORD_UPDATED_WARNING_MESSAGE_HANDLER,
|
||||
})
|
||||
public async authPasswordUpdatedWarningHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -81,7 +92,7 @@ export class AuthMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAuthUsernameUpdatedWarning',
|
||||
name: AUTH_USERNAME_UPDATED_WARNING_MESSAGE_HANDLER,
|
||||
})
|
||||
public async authUsernameUpdatedWarningHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -91,7 +102,7 @@ export class AuthMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingAuthHealthCrit',
|
||||
name: AUTH_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async authHealthCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
|
|
@ -4,6 +4,7 @@ import { WINSTON_MODULE_PROVIDER } from 'nest-winston';
|
|||
import { Logger } from 'winston';
|
||||
import loggerOptions from '../logger.options';
|
||||
import { level } from '../level.enum';
|
||||
import { CONFIGURATION_HEALTH_CRIT_MESSAGE_HANDLER } from '@src/app.constants';
|
||||
|
||||
export class ConfigurationMessageHandler {
|
||||
constructor(
|
||||
|
@ -11,87 +12,7 @@ export class ConfigurationMessageHandler {
|
|||
) {}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingConfigurationCreatedInfo',
|
||||
})
|
||||
public async configurationCreatedInfoHandler(message: string) {
|
||||
this.logger.configure(
|
||||
loggerOptions('configuration', level.info, 'info', 'created'),
|
||||
);
|
||||
this.logger.info(JSON.parse(message));
|
||||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingConfigurationCreatedWarning',
|
||||
})
|
||||
public async configurationCreatedWarningHandler(message: string) {
|
||||
this.logger.configure(
|
||||
loggerOptions('configuration', level.warning, 'warning', 'created'),
|
||||
);
|
||||
this.logger.warning(JSON.parse(message));
|
||||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingConfigurationCreatedCrit',
|
||||
})
|
||||
public async configurationCreatedCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
loggerOptions('configuration', level.crit, 'critical', 'created'),
|
||||
);
|
||||
this.logger.crit(JSON.parse(message));
|
||||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingConfigurationDeletedInfo',
|
||||
})
|
||||
public async configurationDeletedInfoHandler(message: string) {
|
||||
this.logger.configure(
|
||||
loggerOptions('configuration', level.info, 'info', 'deleted'),
|
||||
);
|
||||
this.logger.info(JSON.parse(message));
|
||||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingConfigurationDeletedCrit',
|
||||
})
|
||||
public async configurationDeletedCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
loggerOptions('configuration', level.crit, 'critical', 'deleted'),
|
||||
);
|
||||
this.logger.crit(JSON.parse(message));
|
||||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingConfigurationReadWarning',
|
||||
})
|
||||
public async configurationReadWarningHandler(message: string) {
|
||||
this.logger.configure(
|
||||
loggerOptions('configuration', level.warning, 'warning', 'read'),
|
||||
);
|
||||
this.logger.warning(JSON.parse(message));
|
||||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingConfigurationUpdatedInfo',
|
||||
})
|
||||
public async configurationUpdatedInfoHandler(message: string) {
|
||||
this.logger.configure(
|
||||
loggerOptions('configuration', level.info, 'info', 'updated'),
|
||||
);
|
||||
this.logger.info(JSON.parse(message));
|
||||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingConfigurationUpdatedCrit',
|
||||
})
|
||||
public async configurationUpdatedCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
loggerOptions('configuration', level.crit, 'critical', 'updated'),
|
||||
);
|
||||
this.logger.crit(JSON.parse(message));
|
||||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingConfigurationHealthCrit',
|
||||
name: CONFIGURATION_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async configurationHealthCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
|
|
@ -4,6 +4,7 @@ import { WINSTON_MODULE_PROVIDER } from 'nest-winston';
|
|||
import { Logger } from 'winston';
|
||||
import loggerOptions from '../logger.options';
|
||||
import { level } from '../level.enum';
|
||||
import { GATEWAY_API_HEALTH_CRIT_MESSAGE_HANDLER } from '@src/app.constants';
|
||||
|
||||
export class GatewayApiMessageHandler {
|
||||
constructor(
|
||||
|
@ -11,7 +12,7 @@ export class GatewayApiMessageHandler {
|
|||
) {}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingGatewayApiHealthCrit',
|
||||
name: GATEWAY_API_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async gatewayApiHealthCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
|
|
@ -4,6 +4,7 @@ import { WINSTON_MODULE_PROVIDER } from 'nest-winston';
|
|||
import { Logger } from 'winston';
|
||||
import loggerOptions from '../logger.options';
|
||||
import { level } from '../level.enum';
|
||||
import { LOGGER_HEALTH_CRIT_MESSAGE_HANDLER } from '@src/app.constants';
|
||||
|
||||
export class LoggerMessageHandler {
|
||||
constructor(
|
||||
|
@ -11,7 +12,7 @@ export class LoggerMessageHandler {
|
|||
) {}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingLoggerHealthCrit',
|
||||
name: LOGGER_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async loggerHealthCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
|
|
@ -4,6 +4,10 @@ import { WINSTON_MODULE_PROVIDER } from 'nest-winston';
|
|||
import { Logger } from 'winston';
|
||||
import { level } from '../level.enum';
|
||||
import loggerOptions from '../logger.options';
|
||||
import {
|
||||
MATCHER_AD_CRIT_MESSAGE_HANDLER,
|
||||
MATCHER_MATCH_CRIT_MESSAGE_HANDLER,
|
||||
} from '@src/app.constants';
|
||||
|
||||
export class MatcherMessageHandler {
|
||||
constructor(
|
||||
|
@ -11,7 +15,7 @@ export class MatcherMessageHandler {
|
|||
) {}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingMatcherAdCrit',
|
||||
name: MATCHER_AD_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async matcherAdCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -21,7 +25,7 @@ export class MatcherMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingMatcherMatchCrit',
|
||||
name: MATCHER_MATCH_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async matcherMatchCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
|
|
@ -4,6 +4,17 @@ import { WINSTON_MODULE_PROVIDER } from 'nest-winston';
|
|||
import { Logger } from 'winston';
|
||||
import loggerOptions from '../logger.options';
|
||||
import { level } from '../level.enum';
|
||||
import {
|
||||
TERRITORY_CREATED_CRIT_MESSAGE_HANDLER,
|
||||
TERRITORY_CREATED_INFO_MESSAGE_HANDLER,
|
||||
TERRITORY_CREATED_WARNING_MESSAGE_HANDLER,
|
||||
TERRITORY_DELETED_CRIT_MESSAGE_HANDLER,
|
||||
TERRITORY_DELETED_INFO_MESSAGE_HANDLER,
|
||||
TERRITORY_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
TERRITORY_READ_WARNING_MESSAGE_HANDLER,
|
||||
TERRITORY_UPDATED_CRIT_MESSAGE_HANDLER,
|
||||
TERRITORY_UPDATED_INFO_MESSAGE_HANDLER,
|
||||
} from '@src/app.constants';
|
||||
|
||||
export class TerritoryMessageHandler {
|
||||
constructor(
|
||||
|
@ -11,7 +22,7 @@ export class TerritoryMessageHandler {
|
|||
) {}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingTerritoryCreatedInfo',
|
||||
name: TERRITORY_CREATED_INFO_MESSAGE_HANDLER,
|
||||
})
|
||||
public async territoryCreatedInfoHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -21,7 +32,7 @@ export class TerritoryMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingTerritoryCreatedWarning',
|
||||
name: TERRITORY_CREATED_WARNING_MESSAGE_HANDLER,
|
||||
})
|
||||
public async territoryCreatedWarningHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -31,7 +42,7 @@ export class TerritoryMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingTerritoryCreatedCrit',
|
||||
name: TERRITORY_CREATED_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async territoryCreatedCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -41,7 +52,7 @@ export class TerritoryMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingTerritoryDeletedInfo',
|
||||
name: TERRITORY_DELETED_INFO_MESSAGE_HANDLER,
|
||||
})
|
||||
public async territoryDeletedInfoHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -51,7 +62,7 @@ export class TerritoryMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingTerritoryDeletedCrit',
|
||||
name: TERRITORY_DELETED_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async territoryDeletedCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -61,7 +72,7 @@ export class TerritoryMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingTerritoryReadWarning',
|
||||
name: TERRITORY_READ_WARNING_MESSAGE_HANDLER,
|
||||
})
|
||||
public async territoryReadWarningHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -71,7 +82,7 @@ export class TerritoryMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingTerritoryUpdatedInfo',
|
||||
name: TERRITORY_UPDATED_INFO_MESSAGE_HANDLER,
|
||||
})
|
||||
public async territoryUpdatedInfoHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -81,7 +92,7 @@ export class TerritoryMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingTerritoryUpdatedCrit',
|
||||
name: TERRITORY_UPDATED_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async territoryUpdatedCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -91,7 +102,7 @@ export class TerritoryMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingTerritoryHealthCrit',
|
||||
name: TERRITORY_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async territoryHealthCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
|
|
@ -4,6 +4,17 @@ import { WINSTON_MODULE_PROVIDER } from 'nest-winston';
|
|||
import { Logger } from 'winston';
|
||||
import loggerOptions from '../logger.options';
|
||||
import { level } from '../level.enum';
|
||||
import {
|
||||
USER_CREATED_CRIT_MESSAGE_HANDLER,
|
||||
USER_CREATED_INFO_MESSAGE_HANDLER,
|
||||
USER_CREATED_WARNING_MESSAGE_HANDLER,
|
||||
USER_DELETED_CRIT_MESSAGE_HANDLER,
|
||||
USER_DELETED_INFO_MESSAGE_HANDLER,
|
||||
USER_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
USER_READ_WARNING_MESSAGE_HANDLER,
|
||||
USER_UPDATED_CRIT_MESSAGE_HANDLER,
|
||||
USER_UPDATED_INFO_MESSAGE_HANDLER,
|
||||
} from '@src/app.constants';
|
||||
|
||||
export class UserMessageHandler {
|
||||
constructor(
|
||||
|
@ -11,7 +22,7 @@ export class UserMessageHandler {
|
|||
) {}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingUserCreatedInfo',
|
||||
name: USER_CREATED_INFO_MESSAGE_HANDLER,
|
||||
})
|
||||
public async userCreatedInfoHandler(message: string) {
|
||||
this.logger.configure(loggerOptions('user', level.info, 'info', 'created'));
|
||||
|
@ -19,7 +30,7 @@ export class UserMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingUserCreatedWarning',
|
||||
name: USER_CREATED_WARNING_MESSAGE_HANDLER,
|
||||
})
|
||||
public async userCreatedWarningHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -29,7 +40,7 @@ export class UserMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingUserCreatedCrit',
|
||||
name: USER_CREATED_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async userCreatedCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -39,7 +50,7 @@ export class UserMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingUserDeletedInfo',
|
||||
name: USER_DELETED_INFO_MESSAGE_HANDLER,
|
||||
})
|
||||
public async userDeletedInfoHandler(message: string) {
|
||||
this.logger.configure(loggerOptions('user', level.info, 'info', 'deleted'));
|
||||
|
@ -47,7 +58,7 @@ export class UserMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingUserDeletedCrit',
|
||||
name: USER_DELETED_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async userDeletedCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -57,7 +68,7 @@ export class UserMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingUserReadWarning',
|
||||
name: USER_READ_WARNING_MESSAGE_HANDLER,
|
||||
})
|
||||
public async userReadWarningHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -67,7 +78,7 @@ export class UserMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingUserUpdatedInfo',
|
||||
name: USER_UPDATED_INFO_MESSAGE_HANDLER,
|
||||
})
|
||||
public async userUpdatedInfoHandler(message: string) {
|
||||
this.logger.configure(loggerOptions('user', level.info, 'info', 'updated'));
|
||||
|
@ -75,7 +86,7 @@ export class UserMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingUserUpdatedCrit',
|
||||
name: USER_UPDATED_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async userUpdatedCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
@ -85,7 +96,7 @@ export class UserMessageHandler {
|
|||
}
|
||||
|
||||
@RabbitSubscribe({
|
||||
name: 'loggingUserHealthCrit',
|
||||
name: USER_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
})
|
||||
public async userHealthCriticalHandler(message: string) {
|
||||
this.logger.configure(
|
||||
|
|
|
@ -6,6 +6,135 @@ import {
|
|||
MessageBrokerPublisher,
|
||||
} from '@mobicoop/message-broker-module';
|
||||
import { ConfigModule, ConfigService } from '@nestjs/config';
|
||||
import {
|
||||
ADMIN_API_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
ADMIN_API_HEALTH_CRIT_ROUTING_KEY,
|
||||
ADMIN_API_HEALTH_CRIT_QUEUE,
|
||||
AD_CREATED_CRIT_MESSAGE_HANDLER,
|
||||
AD_CREATED_CRIT_ROUTING_KEY,
|
||||
AD_CREATED_CRIT_QUEUE,
|
||||
AD_CREATED_INFO_MESSAGE_HANDLER,
|
||||
AD_CREATED_INFO_ROUTING_KEY,
|
||||
AD_CREATED_INFO_QUEUE,
|
||||
AD_CREATED_WARNING_MESSAGE_HANDLER,
|
||||
AD_CREATED_WARNING_ROUTING_KEY,
|
||||
AD_CREATED_WARNING_QUEUE,
|
||||
AD_DELETED_CRIT_MESSAGE_HANDLER,
|
||||
AD_DELETED_CRIT_ROUTING_KEY,
|
||||
AD_DELETED_CRIT_QUEUE,
|
||||
AD_DELETED_INFO_MESSAGE_HANDLER,
|
||||
AD_DELETED_INFO_ROUTING_KEY,
|
||||
AD_DELETED_INFO_QUEUE,
|
||||
AD_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
AD_HEALTH_CRIT_ROUTING_KEY,
|
||||
AD_HEALTH_CRIT_QUEUE,
|
||||
AD_READ_WARNING_MESSAGE_HANDLER,
|
||||
AD_READ_WARNING_ROUTING_KEY,
|
||||
AD_READ_WARNING_QUEUE,
|
||||
AD_UPDATED_CRIT_MESSAGE_HANDLER,
|
||||
AD_UPDATED_CRIT_ROUTING_KEY,
|
||||
AD_UPDATED_CRIT_QUEUE,
|
||||
AD_UPDATED_INFO_MESSAGE_HANDLER,
|
||||
AD_UPDATED_INFO_ROUTING_KEY,
|
||||
AD_UPDATED_INFO_QUEUE,
|
||||
AUTH_CREATED_CRIT_MESSAGE_HANDLER,
|
||||
AUTH_CREATED_CRIT_ROUTING_KEY,
|
||||
AUTH_CREATED_CRIT_QUEUE,
|
||||
AUTH_DELETED_CRIT_MESSAGE_HANDLER,
|
||||
AUTH_DELETED_CRIT_ROUTING_KEY,
|
||||
AUTH_DELETED_CRIT_QUEUE,
|
||||
AUTH_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
AUTH_HEALTH_CRIT_ROUTING_KEY,
|
||||
AUTH_HEALTH_CRIT_QUEUE,
|
||||
AUTH_PASSWORD_UPDATED_WARNING_MESSAGE_HANDLER,
|
||||
AUTH_PASSWORD_UPDATED_WARNING_ROUTING_KEY,
|
||||
AUTH_PASSWORD_UPDATED_WARNING_QUEUE,
|
||||
AUTH_READ_WARNING_MESSAGE_HANDLER,
|
||||
AUTH_READ_WARNING_ROUTING_KEY,
|
||||
AUTH_READ_WARNING_QUEUE,
|
||||
AUTH_USERNAME_CREATED_WARNING_MESSAGE_HANDLER,
|
||||
AUTH_USERNAME_CREATED_WARNING_ROUTING_KEY,
|
||||
AUTH_USERNAME_CREATED_WARNING_QUEUE,
|
||||
AUTH_USERNAME_DELETED_WARNING_MESSAGE_HANDLER,
|
||||
AUTH_USERNAME_DELETED_WARNING_ROUTING_KEY,
|
||||
AUTH_USERNAME_DELETED_WARNING_QUEUE,
|
||||
AUTH_USERNAME_READ_WARNING_MESSAGE_HANDLER,
|
||||
AUTH_USERNAME_READ_WARNING_ROUTING_KEY,
|
||||
AUTH_USERNAME_READ_WARNING_QUEUE,
|
||||
AUTH_USERNAME_UPDATED_WARNING_MESSAGE_HANDLER,
|
||||
AUTH_USERNAME_UPDATED_WARNING_ROUTING_KEY,
|
||||
AUTH_USERNAME_UPDATED_WARNING_QUEUE,
|
||||
CONFIGURATION_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
CONFIGURATION_HEALTH_CRIT_ROUTING_KEY,
|
||||
CONFIGURATION_HEALTH_CRIT_QUEUE,
|
||||
GATEWAY_API_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
GATEWAY_API_HEALTH_CRIT_ROUTING_KEY,
|
||||
GATEWAY_API_HEALTH_CRIT_QUEUE,
|
||||
LOGGER_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
LOGGER_HEALTH_CRIT_ROUTING_KEY,
|
||||
LOGGER_HEALTH_CRIT_QUEUE,
|
||||
MATCHER_AD_CRIT_MESSAGE_HANDLER,
|
||||
MATCHER_AD_CRIT_ROUTING_KEY,
|
||||
MATCHER_AD_CRIT_QUEUE,
|
||||
MATCHER_MATCH_CRIT_MESSAGE_HANDLER,
|
||||
MATCHER_MATCH_CRIT_ROUTING_KEY,
|
||||
MATCHER_MATCH_CRIT_QUEUE,
|
||||
SERVICE_NAME,
|
||||
TERRITORY_CREATED_CRIT_MESSAGE_HANDLER,
|
||||
TERRITORY_CREATED_CRIT_ROUTING_KEY,
|
||||
TERRITORY_CREATED_CRIT_QUEUE,
|
||||
TERRITORY_CREATED_INFO_MESSAGE_HANDLER,
|
||||
TERRITORY_CREATED_INFO_ROUTING_KEY,
|
||||
TERRITORY_CREATED_INFO_QUEUE,
|
||||
TERRITORY_CREATED_WARNING_MESSAGE_HANDLER,
|
||||
TERRITORY_CREATED_WARNING_ROUTING_KEY,
|
||||
TERRITORY_CREATED_WARNING_QUEUE,
|
||||
TERRITORY_DELETED_CRIT_MESSAGE_HANDLER,
|
||||
TERRITORY_DELETED_CRIT_ROUTING_KEY,
|
||||
TERRITORY_DELETED_CRIT_QUEUE,
|
||||
TERRITORY_DELETED_INFO_MESSAGE_HANDLER,
|
||||
TERRITORY_DELETED_INFO_ROUTING_KEY,
|
||||
TERRITORY_DELETED_INFO_QUEUE,
|
||||
TERRITORY_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
TERRITORY_HEALTH_CRIT_ROUTING_KEY,
|
||||
TERRITORY_HEALTH_CRIT_QUEUE,
|
||||
TERRITORY_READ_WARNING_MESSAGE_HANDLER,
|
||||
TERRITORY_READ_WARNING_ROUTING_KEY,
|
||||
TERRITORY_READ_WARNING_QUEUE,
|
||||
TERRITORY_UPDATED_CRIT_MESSAGE_HANDLER,
|
||||
TERRITORY_UPDATED_CRIT_ROUTING_KEY,
|
||||
TERRITORY_UPDATED_CRIT_QUEUE,
|
||||
TERRITORY_UPDATED_INFO_MESSAGE_HANDLER,
|
||||
TERRITORY_UPDATED_INFO_ROUTING_KEY,
|
||||
TERRITORY_UPDATED_INFO_QUEUE,
|
||||
USER_CREATED_CRIT_MESSAGE_HANDLER,
|
||||
USER_CREATED_CRIT_ROUTING_KEY,
|
||||
USER_CREATED_CRIT_QUEUE,
|
||||
USER_CREATED_INFO_MESSAGE_HANDLER,
|
||||
USER_CREATED_INFO_ROUTING_KEY,
|
||||
USER_CREATED_INFO_QUEUE,
|
||||
USER_CREATED_WARNING_MESSAGE_HANDLER,
|
||||
USER_CREATED_WARNING_ROUTING_KEY,
|
||||
USER_CREATED_WARNING_QUEUE,
|
||||
USER_DELETED_CRIT_MESSAGE_HANDLER,
|
||||
USER_DELETED_CRIT_ROUTING_KEY,
|
||||
USER_DELETED_CRIT_QUEUE,
|
||||
USER_DELETED_INFO_MESSAGE_HANDLER,
|
||||
USER_DELETED_INFO_ROUTING_KEY,
|
||||
USER_DELETED_INFO_QUEUE,
|
||||
USER_HEALTH_CRIT_MESSAGE_HANDLER,
|
||||
USER_HEALTH_CRIT_ROUTING_KEY,
|
||||
USER_HEALTH_CRIT_QUEUE,
|
||||
USER_READ_WARNING_MESSAGE_HANDLER,
|
||||
USER_READ_WARNING_ROUTING_KEY,
|
||||
USER_READ_WARNING_QUEUE,
|
||||
USER_UPDATED_CRIT_MESSAGE_HANDLER,
|
||||
USER_UPDATED_CRIT_ROUTING_KEY,
|
||||
USER_UPDATED_CRIT_QUEUE,
|
||||
USER_UPDATED_INFO_MESSAGE_HANDLER,
|
||||
USER_UPDATED_INFO_ROUTING_KEY,
|
||||
USER_UPDATED_INFO_QUEUE,
|
||||
} from '@src/app.constants';
|
||||
|
||||
const imports = [
|
||||
MessageBrokerModule.forRootAsync({
|
||||
|
@ -14,209 +143,182 @@ const imports = [
|
|||
useFactory: async (
|
||||
configService: ConfigService,
|
||||
): Promise<MessageBrokerModuleOptions> => ({
|
||||
uri: configService.get<string>('MESSAGE_BROKER_URI'),
|
||||
exchange: configService.get<string>('MESSAGE_BROKER_EXCHANGE'),
|
||||
name: 'logger',
|
||||
uri: configService.get<string>('MESSAGE_BROKER_URI') as string,
|
||||
exchange: {
|
||||
name: configService.get<string>('MESSAGE_BROKER_EXCHANGE') as string,
|
||||
durable: configService.get<boolean>(
|
||||
'MESSAGE_BROKER_EXCHANGE_DURABILITY',
|
||||
) as boolean,
|
||||
},
|
||||
name: SERVICE_NAME,
|
||||
handlers: {
|
||||
loggingGatewayApiHealthCrit: {
|
||||
routingKey: 'logging.gateway-api.health.crit',
|
||||
queue: 'logging-gateway-api-health-crit',
|
||||
[GATEWAY_API_HEALTH_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: GATEWAY_API_HEALTH_CRIT_ROUTING_KEY,
|
||||
queue: GATEWAY_API_HEALTH_CRIT_QUEUE,
|
||||
},
|
||||
loggingAdminApiHealthCrit: {
|
||||
routingKey: 'logging.admin-api.health.crit',
|
||||
queue: 'logging-admin-api-health-crit',
|
||||
[ADMIN_API_HEALTH_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: ADMIN_API_HEALTH_CRIT_ROUTING_KEY,
|
||||
queue: ADMIN_API_HEALTH_CRIT_QUEUE,
|
||||
},
|
||||
loggingAdCreatedInfo: {
|
||||
routingKey: 'logging.ad.created.info',
|
||||
queue: 'logging-ad-created-info',
|
||||
[AD_CREATED_INFO_MESSAGE_HANDLER]: {
|
||||
routingKey: AD_CREATED_INFO_ROUTING_KEY,
|
||||
queue: AD_CREATED_INFO_QUEUE,
|
||||
},
|
||||
loggingAdCreatedWarning: {
|
||||
routingKey: 'logging.ad.created.warning',
|
||||
queue: 'logging-ad-created-warning',
|
||||
[AD_CREATED_WARNING_MESSAGE_HANDLER]: {
|
||||
routingKey: AD_CREATED_WARNING_ROUTING_KEY,
|
||||
queue: AD_CREATED_WARNING_QUEUE,
|
||||
},
|
||||
loggingAdCreatedCrit: {
|
||||
routingKey: 'logging.ad.created.crit',
|
||||
queue: 'logging-ad-created-crit',
|
||||
[AD_CREATED_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: AD_CREATED_CRIT_ROUTING_KEY,
|
||||
queue: AD_CREATED_CRIT_QUEUE,
|
||||
},
|
||||
loggingAdDeletedInfo: {
|
||||
routingKey: 'logging.ad.deleted.info',
|
||||
queue: 'logging-ad-deleted-info',
|
||||
[AD_DELETED_INFO_MESSAGE_HANDLER]: {
|
||||
routingKey: AD_DELETED_INFO_ROUTING_KEY,
|
||||
queue: AD_DELETED_INFO_QUEUE,
|
||||
},
|
||||
loggingAdDeletedCrit: {
|
||||
routingKey: 'logging.ad.deleted.crit',
|
||||
queue: 'logging-ad-deleted-crit',
|
||||
[AD_DELETED_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: AD_DELETED_CRIT_ROUTING_KEY,
|
||||
queue: AD_DELETED_CRIT_QUEUE,
|
||||
},
|
||||
loggingAdReadWarning: {
|
||||
routingKey: 'logging.ad.read.warning',
|
||||
queue: 'logging-ad-read-warning',
|
||||
[AD_READ_WARNING_MESSAGE_HANDLER]: {
|
||||
routingKey: AD_READ_WARNING_ROUTING_KEY,
|
||||
queue: AD_READ_WARNING_QUEUE,
|
||||
},
|
||||
loggingAdUpdatedInfo: {
|
||||
routingKey: 'logging.ad.updated.info',
|
||||
queue: 'logging-ad-updated-info',
|
||||
[AD_UPDATED_INFO_MESSAGE_HANDLER]: {
|
||||
routingKey: AD_UPDATED_INFO_ROUTING_KEY,
|
||||
queue: AD_UPDATED_INFO_QUEUE,
|
||||
},
|
||||
loggingAdUpdatedCrit: {
|
||||
routingKey: 'logging.ad.updated.crit',
|
||||
queue: 'logging-ad-updated-crit',
|
||||
[AD_UPDATED_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: AD_UPDATED_CRIT_ROUTING_KEY,
|
||||
queue: AD_UPDATED_CRIT_QUEUE,
|
||||
},
|
||||
loggingAdHealthCrit: {
|
||||
routingKey: 'logging.ad.health.crit',
|
||||
queue: 'logging-ad-health-crit',
|
||||
[AD_HEALTH_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: AD_HEALTH_CRIT_ROUTING_KEY,
|
||||
queue: AD_HEALTH_CRIT_QUEUE,
|
||||
},
|
||||
loggingAuthCreatedCrit: {
|
||||
routingKey: 'logging.auth.created.crit',
|
||||
queue: 'logging-auth-created-crit',
|
||||
[AUTH_CREATED_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: AUTH_CREATED_CRIT_ROUTING_KEY,
|
||||
queue: AUTH_CREATED_CRIT_QUEUE,
|
||||
},
|
||||
loggingAuthDeletedCrit: {
|
||||
routingKey: 'logging.auth.deleted.crit',
|
||||
queue: 'logging-auth-deleted-crit',
|
||||
[AUTH_DELETED_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: AUTH_DELETED_CRIT_ROUTING_KEY,
|
||||
queue: AUTH_DELETED_CRIT_QUEUE,
|
||||
},
|
||||
loggingAuthReadWarning: {
|
||||
routingKey: 'logging.auth.read.warning',
|
||||
queue: 'logging-auth-read-warning',
|
||||
[AUTH_READ_WARNING_MESSAGE_HANDLER]: {
|
||||
routingKey: AUTH_READ_WARNING_ROUTING_KEY,
|
||||
queue: AUTH_READ_WARNING_QUEUE,
|
||||
},
|
||||
loggingAuthUsernameCreatedWarning: {
|
||||
routingKey: 'logging.auth.username.created.warning',
|
||||
queue: 'logging-auth-username-created-warning',
|
||||
[AUTH_USERNAME_CREATED_WARNING_MESSAGE_HANDLER]: {
|
||||
routingKey: AUTH_USERNAME_CREATED_WARNING_ROUTING_KEY,
|
||||
queue: AUTH_USERNAME_CREATED_WARNING_QUEUE,
|
||||
},
|
||||
loggingAuthUsernameDeletedWarning: {
|
||||
routingKey: 'logging.auth.username.deleted.warning',
|
||||
queue: 'logging-auth-username-deleted-warning',
|
||||
[AUTH_USERNAME_DELETED_WARNING_MESSAGE_HANDLER]: {
|
||||
routingKey: AUTH_USERNAME_DELETED_WARNING_ROUTING_KEY,
|
||||
queue: AUTH_USERNAME_DELETED_WARNING_QUEUE,
|
||||
},
|
||||
loggingAuthUsernameReadWarning: {
|
||||
routingKey: 'logging.auth.username.read.warning',
|
||||
queue: 'logging-auth-username-read-warning',
|
||||
[AUTH_USERNAME_READ_WARNING_MESSAGE_HANDLER]: {
|
||||
routingKey: AUTH_USERNAME_READ_WARNING_ROUTING_KEY,
|
||||
queue: AUTH_USERNAME_READ_WARNING_QUEUE,
|
||||
},
|
||||
loggingAuthPasswordUpdatedWarning: {
|
||||
routingKey: 'logging.auth.password.updated.warning',
|
||||
queue: 'logging-auth-password-updated-warning',
|
||||
[AUTH_PASSWORD_UPDATED_WARNING_MESSAGE_HANDLER]: {
|
||||
routingKey: AUTH_PASSWORD_UPDATED_WARNING_ROUTING_KEY,
|
||||
queue: AUTH_PASSWORD_UPDATED_WARNING_QUEUE,
|
||||
},
|
||||
loggingAuthUsernameUpdatedWarning: {
|
||||
routingKey: 'logging.auth.username.updated.warning',
|
||||
queue: 'logging-auth-username-updated-warning',
|
||||
[AUTH_USERNAME_UPDATED_WARNING_MESSAGE_HANDLER]: {
|
||||
routingKey: AUTH_USERNAME_UPDATED_WARNING_ROUTING_KEY,
|
||||
queue: AUTH_USERNAME_UPDATED_WARNING_QUEUE,
|
||||
},
|
||||
loggingAuthHealthCrit: {
|
||||
routingKey: 'logging.auth.health.crit',
|
||||
queue: 'logging-auth-health-crit',
|
||||
[AUTH_HEALTH_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: AUTH_HEALTH_CRIT_ROUTING_KEY,
|
||||
queue: AUTH_HEALTH_CRIT_QUEUE,
|
||||
},
|
||||
loggingConfigurationCreatedInfo: {
|
||||
routingKey: 'logging.configuration.created.info',
|
||||
queue: 'logging-configuration-created-info',
|
||||
[CONFIGURATION_HEALTH_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: CONFIGURATION_HEALTH_CRIT_ROUTING_KEY,
|
||||
queue: CONFIGURATION_HEALTH_CRIT_QUEUE,
|
||||
},
|
||||
loggingConfigurationCreatedWarning: {
|
||||
routingKey: 'logging.configuration.created.warning',
|
||||
queue: 'logging-configuration-created-warning',
|
||||
[LOGGER_HEALTH_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: LOGGER_HEALTH_CRIT_ROUTING_KEY,
|
||||
queue: LOGGER_HEALTH_CRIT_QUEUE,
|
||||
},
|
||||
loggingConfigurationCreatedCrit: {
|
||||
routingKey: 'logging.configuration.created.crit',
|
||||
queue: 'logging-configuration-created-crit',
|
||||
[MATCHER_AD_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: MATCHER_AD_CRIT_ROUTING_KEY,
|
||||
queue: MATCHER_AD_CRIT_QUEUE,
|
||||
},
|
||||
loggingConfigurationDeletedInfo: {
|
||||
routingKey: 'logging.configuration.deleted.info',
|
||||
queue: 'logging-configuration-deleted-info',
|
||||
[MATCHER_MATCH_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: MATCHER_MATCH_CRIT_ROUTING_KEY,
|
||||
queue: MATCHER_MATCH_CRIT_QUEUE,
|
||||
},
|
||||
loggingConfigurationDeletedCrit: {
|
||||
routingKey: 'logging.configuration.deleted.crit',
|
||||
queue: 'logging-configuration-deleted-crit',
|
||||
[TERRITORY_CREATED_INFO_MESSAGE_HANDLER]: {
|
||||
routingKey: TERRITORY_CREATED_INFO_ROUTING_KEY,
|
||||
queue: TERRITORY_CREATED_INFO_QUEUE,
|
||||
},
|
||||
loggingConfigurationReadWarning: {
|
||||
routingKey: 'logging.configuration.read.warning',
|
||||
queue: 'logging-configuration-read-warning',
|
||||
[TERRITORY_CREATED_WARNING_MESSAGE_HANDLER]: {
|
||||
routingKey: TERRITORY_CREATED_WARNING_ROUTING_KEY,
|
||||
queue: TERRITORY_CREATED_WARNING_QUEUE,
|
||||
},
|
||||
loggingConfigurationUpdatedInfo: {
|
||||
routingKey: 'logging.configuration.updated.info',
|
||||
queue: 'logging-configuration-updated-info',
|
||||
[TERRITORY_CREATED_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: TERRITORY_CREATED_CRIT_ROUTING_KEY,
|
||||
queue: TERRITORY_CREATED_CRIT_QUEUE,
|
||||
},
|
||||
loggingConfigurationUpdatedCrit: {
|
||||
routingKey: 'logging.configuration.updated.crit',
|
||||
queue: 'logging-configuration-updated-crit',
|
||||
[TERRITORY_DELETED_INFO_MESSAGE_HANDLER]: {
|
||||
routingKey: TERRITORY_DELETED_INFO_ROUTING_KEY,
|
||||
queue: TERRITORY_DELETED_INFO_QUEUE,
|
||||
},
|
||||
loggingConfigurationHealthCrit: {
|
||||
routingKey: 'logging.configuration.health.crit',
|
||||
queue: 'logging-configuration-health-crit',
|
||||
[TERRITORY_DELETED_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: TERRITORY_DELETED_CRIT_ROUTING_KEY,
|
||||
queue: TERRITORY_DELETED_CRIT_QUEUE,
|
||||
},
|
||||
loggingLoggerHealthCrit: {
|
||||
routingKey: 'logging.logger.health.crit',
|
||||
queue: 'logging-logger-health-crit',
|
||||
[TERRITORY_READ_WARNING_MESSAGE_HANDLER]: {
|
||||
routingKey: TERRITORY_READ_WARNING_ROUTING_KEY,
|
||||
queue: TERRITORY_READ_WARNING_QUEUE,
|
||||
},
|
||||
loggingMatcherAdCrit: {
|
||||
routingKey: 'logging.matcher.ad.crit',
|
||||
queue: 'logging-matcher-ad-crit',
|
||||
[TERRITORY_UPDATED_INFO_MESSAGE_HANDLER]: {
|
||||
routingKey: TERRITORY_UPDATED_INFO_ROUTING_KEY,
|
||||
queue: TERRITORY_UPDATED_INFO_QUEUE,
|
||||
},
|
||||
loggingMatcherMatchCrit: {
|
||||
routingKey: 'logging.matcher.match.crit',
|
||||
queue: 'logging-matcher-match-crit',
|
||||
[TERRITORY_UPDATED_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: TERRITORY_UPDATED_CRIT_ROUTING_KEY,
|
||||
queue: TERRITORY_UPDATED_CRIT_QUEUE,
|
||||
},
|
||||
loggingTerritoryCreatedInfo: {
|
||||
routingKey: 'logging.territory.created.info',
|
||||
queue: 'logging-territory-created-info',
|
||||
[TERRITORY_HEALTH_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: TERRITORY_HEALTH_CRIT_ROUTING_KEY,
|
||||
queue: TERRITORY_HEALTH_CRIT_QUEUE,
|
||||
},
|
||||
loggingTerritoryCreatedWarning: {
|
||||
routingKey: 'logging.territory.created.warning',
|
||||
queue: 'logging-territory-created-warning',
|
||||
[USER_CREATED_INFO_MESSAGE_HANDLER]: {
|
||||
routingKey: USER_CREATED_INFO_ROUTING_KEY,
|
||||
queue: USER_CREATED_INFO_QUEUE,
|
||||
},
|
||||
loggingTerritoryCreatedCrit: {
|
||||
routingKey: 'logging.territory.created.crit',
|
||||
queue: 'logging-territory-created-crit',
|
||||
[USER_CREATED_WARNING_MESSAGE_HANDLER]: {
|
||||
routingKey: USER_CREATED_WARNING_ROUTING_KEY,
|
||||
queue: USER_CREATED_WARNING_QUEUE,
|
||||
},
|
||||
loggingTerritoryDeletedInfo: {
|
||||
routingKey: 'logging.territory.deleted.info',
|
||||
queue: 'logging-territory-deleted-info',
|
||||
[USER_CREATED_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: USER_CREATED_CRIT_ROUTING_KEY,
|
||||
queue: USER_CREATED_CRIT_QUEUE,
|
||||
},
|
||||
loggingTerritoryDeletedCrit: {
|
||||
routingKey: 'logging.territory.deleted.crit',
|
||||
queue: 'logging-territory-deleted-crit',
|
||||
[USER_DELETED_INFO_MESSAGE_HANDLER]: {
|
||||
routingKey: USER_DELETED_INFO_ROUTING_KEY,
|
||||
queue: USER_DELETED_INFO_QUEUE,
|
||||
},
|
||||
loggingTerritoryReadWarning: {
|
||||
routingKey: 'logging.territory.read.warning',
|
||||
queue: 'logging-territory-read-warning',
|
||||
[USER_DELETED_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: USER_DELETED_CRIT_ROUTING_KEY,
|
||||
queue: USER_DELETED_CRIT_QUEUE,
|
||||
},
|
||||
loggingTerritoryUpdatedInfo: {
|
||||
routingKey: 'logging.territory.updated.info',
|
||||
queue: 'logging-territory-updated-info',
|
||||
[USER_READ_WARNING_MESSAGE_HANDLER]: {
|
||||
routingKey: USER_READ_WARNING_ROUTING_KEY,
|
||||
queue: USER_READ_WARNING_QUEUE,
|
||||
},
|
||||
loggingTerritoryUpdatedCrit: {
|
||||
routingKey: 'logging.territory.updated.crit',
|
||||
queue: 'logging-territory-updated-crit',
|
||||
[USER_UPDATED_INFO_MESSAGE_HANDLER]: {
|
||||
routingKey: USER_UPDATED_INFO_ROUTING_KEY,
|
||||
queue: USER_UPDATED_INFO_QUEUE,
|
||||
},
|
||||
loggingTerritoryHealthCrit: {
|
||||
routingKey: 'logging.territory.health.crit',
|
||||
queue: 'logging-territory-health-crit',
|
||||
[USER_UPDATED_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: USER_UPDATED_CRIT_ROUTING_KEY,
|
||||
queue: USER_UPDATED_CRIT_QUEUE,
|
||||
},
|
||||
loggingUserCreatedInfo: {
|
||||
routingKey: 'logging.user.created.info',
|
||||
queue: 'logging-user-created-info',
|
||||
},
|
||||
loggingUserCreatedWarning: {
|
||||
routingKey: 'logging.user.created.warning',
|
||||
queue: 'logging-user-created-warning',
|
||||
},
|
||||
loggingUserCreatedCrit: {
|
||||
routingKey: 'logging.user.created.crit',
|
||||
queue: 'logging-user-created-crit',
|
||||
},
|
||||
loggingUserDeletedInfo: {
|
||||
routingKey: 'logging.user.deleted.info',
|
||||
queue: 'logging-user-deleted-info',
|
||||
},
|
||||
loggingUserDeletedCrit: {
|
||||
routingKey: 'logging.user.deleted.crit',
|
||||
queue: 'logging-user-deleted-crit',
|
||||
},
|
||||
loggingUserReadWarning: {
|
||||
routingKey: 'logging.user.read.warning',
|
||||
queue: 'logging-user-read-warning',
|
||||
},
|
||||
loggingUserUpdatedInfo: {
|
||||
routingKey: 'logging.user.updated.info',
|
||||
queue: 'logging-user-updated-info',
|
||||
},
|
||||
loggingUserUpdatedCrit: {
|
||||
routingKey: 'logging.user.updated.crit',
|
||||
queue: 'logging-user-updated-crit',
|
||||
},
|
||||
loggingUserHealthCrit: {
|
||||
routingKey: 'logging.user.health.crit',
|
||||
queue: 'logging-user-health-crit',
|
||||
[USER_HEALTH_CRIT_MESSAGE_HANDLER]: {
|
||||
routingKey: USER_HEALTH_CRIT_ROUTING_KEY,
|
||||
queue: USER_HEALTH_CRIT_QUEUE,
|
||||
},
|
||||
},
|
||||
}),
|
||||
|
|
|
@ -12,12 +12,13 @@
|
|||
"baseUrl": "./",
|
||||
"incremental": true,
|
||||
"skipLibCheck": true,
|
||||
"strictNullChecks": false,
|
||||
"noImplicitAny": false,
|
||||
"strictNullChecks": true,
|
||||
"noImplicitAny": true,
|
||||
"strictBindCallApply": false,
|
||||
"forceConsistentCasingInFileNames": false,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noFallthroughCasesInSwitch": false,
|
||||
"paths": {
|
||||
"@libs/*": ["src/libs/*"],
|
||||
"@modules/*": ["src/modules/*"],
|
||||
"@src/*": ["src/*"]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue