mirror of
https://github.com/immich-app/immich.git
synced 2025-12-30 09:15:28 +03:00
refactor: logging repository (#15540)
This commit is contained in:
@@ -2,19 +2,18 @@ import {
|
||||
CallHandler,
|
||||
ExecutionContext,
|
||||
HttpException,
|
||||
Inject,
|
||||
Injectable,
|
||||
InternalServerErrorException,
|
||||
NestInterceptor,
|
||||
} from '@nestjs/common';
|
||||
import { Observable, catchError, throwError } from 'rxjs';
|
||||
import { ILoggerRepository } from 'src/interfaces/logger.interface';
|
||||
import { LoggingRepository } from 'src/repositories/logging.repository';
|
||||
import { logGlobalError } from 'src/utils/logger';
|
||||
import { routeToErrorMessage } from 'src/utils/misc';
|
||||
|
||||
@Injectable()
|
||||
export class ErrorInterceptor implements NestInterceptor {
|
||||
constructor(@Inject(ILoggerRepository) private logger: ILoggerRepository) {
|
||||
constructor(private logger: LoggingRepository) {
|
||||
this.logger.setContext(ErrorInterceptor.name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user