read logs
This commit is contained in:
parent
5efffbef3d
commit
2675902468
|
@ -32,11 +32,21 @@ export class AuthController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@RabbitSubscribe({
|
@RabbitSubscribe({
|
||||||
name: 'loggingAuthUsernameAddedWarning',
|
name: 'loggingAuthReadWarning',
|
||||||
})
|
})
|
||||||
public async authUsernameAddedWarningHandler(message: string) {
|
public async authReadWarningHandler(message: string) {
|
||||||
this.logger.configure(
|
this.logger.configure(
|
||||||
loggerOptions('auth', level.warning, 'warning', 'username-added'),
|
loggerOptions('auth', level.warning, 'warning', 'read'),
|
||||||
|
);
|
||||||
|
this.logger.crit(JSON.parse(message));
|
||||||
|
}
|
||||||
|
|
||||||
|
@RabbitSubscribe({
|
||||||
|
name: 'loggingAuthUsernameCreatedWarning',
|
||||||
|
})
|
||||||
|
public async authUsernameCreatedWarningHandler(message: string) {
|
||||||
|
this.logger.configure(
|
||||||
|
loggerOptions('auth', level.warning, 'warning', 'username-created'),
|
||||||
);
|
);
|
||||||
this.logger.warning(JSON.parse(message));
|
this.logger.warning(JSON.parse(message));
|
||||||
}
|
}
|
||||||
|
@ -51,6 +61,16 @@ export class AuthController {
|
||||||
this.logger.warning(JSON.parse(message));
|
this.logger.warning(JSON.parse(message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RabbitSubscribe({
|
||||||
|
name: 'loggingAuthUsernameReadWarning',
|
||||||
|
})
|
||||||
|
public async authUsernameReadWarningHandler(message: string) {
|
||||||
|
this.logger.configure(
|
||||||
|
loggerOptions('auth', level.warning, 'warning', 'username-read'),
|
||||||
|
);
|
||||||
|
this.logger.warning(JSON.parse(message));
|
||||||
|
}
|
||||||
|
|
||||||
@RabbitSubscribe({
|
@RabbitSubscribe({
|
||||||
name: 'loggingAuthPasswordUpdatedWarning',
|
name: 'loggingAuthPasswordUpdatedWarning',
|
||||||
})
|
})
|
||||||
|
|
|
@ -89,16 +89,26 @@ import { AdminApiController } from './interface/message-controllers/admin-api.co
|
||||||
routingKey: 'logging.auth.deleted.crit',
|
routingKey: 'logging.auth.deleted.crit',
|
||||||
queue: 'logging-auth-deleted-crit',
|
queue: 'logging-auth-deleted-crit',
|
||||||
},
|
},
|
||||||
loggingAuthUsernameAddedWarning: {
|
loggingAuthReadWarning: {
|
||||||
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
||||||
routingKey: 'logging.auth.username.added.warning',
|
routingKey: 'logging.auth.read.warning',
|
||||||
queue: 'logging-auth-username-added-warning',
|
queue: 'logging-auth-read-warning',
|
||||||
|
},
|
||||||
|
loggingAuthUsernameCreatedWarning: {
|
||||||
|
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
||||||
|
routingKey: 'logging.auth.username.created.warning',
|
||||||
|
queue: 'logging-auth-username-created-warning',
|
||||||
},
|
},
|
||||||
loggingAuthUsernameDeletedWarning: {
|
loggingAuthUsernameDeletedWarning: {
|
||||||
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
||||||
routingKey: 'logging.auth.username.deleted.warning',
|
routingKey: 'logging.auth.username.deleted.warning',
|
||||||
queue: 'logging-auth-username-deleted-warning',
|
queue: 'logging-auth-username-deleted-warning',
|
||||||
},
|
},
|
||||||
|
loggingAuthUsernameReadWarning: {
|
||||||
|
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
||||||
|
routingKey: 'logging.auth.username.read.warning',
|
||||||
|
queue: 'logging-auth-username-read-warning',
|
||||||
|
},
|
||||||
loggingAuthPasswordUpdatedWarning: {
|
loggingAuthPasswordUpdatedWarning: {
|
||||||
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
exchange: configService.get<string>('RMQ_EXCHANGE'),
|
||||||
routingKey: 'logging.auth.password.updated.warning',
|
routingKey: 'logging.auth.password.updated.warning',
|
||||||
|
|
Loading…
Reference in New Issue