refactor: logging repository (#15540)

This commit is contained in:
Jason Rasmussen
2025-01-23 08:31:30 -05:00
committed by GitHub
parent b31414af8f
commit d3446f3092
53 changed files with 159 additions and 172 deletions

View File

@@ -1,7 +1,7 @@
import { CallHandler, ExecutionContext, Inject, Injectable, NestInterceptor } from '@nestjs/common';
import { CallHandler, ExecutionContext, Injectable, NestInterceptor } from '@nestjs/common';
import { Request, Response } from 'express';
import { Observable, finalize } from 'rxjs';
import { ILoggerRepository } from 'src/interfaces/logger.interface';
import { LoggingRepository } from 'src/repositories/logging.repository';
const maxArrayLength = 100;
const replacer = (key: string, value: unknown) => {
@@ -18,7 +18,7 @@ const replacer = (key: string, value: unknown) => {
@Injectable()
export class LoggingInterceptor implements NestInterceptor {
constructor(@Inject(ILoggerRepository) private logger: ILoggerRepository) {
constructor(private logger: LoggingRepository) {
this.logger.setContext(LoggingInterceptor.name);
}