mirror of
https://github.com/immich-app/immich.git
synced 2026-02-12 03:47:51 +03:00
refactor: logging repository (#15540)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user