Skip to content
Snippets Groups Projects
app-logger.ts 499 B
import { Logger } from '@nestjs/common';

export class AppLogger extends Logger {
  log(message: string, context?: string) {
    // add your tailored logic here
    super.log(`[log] ${message}`, context);
  }

  warn(message: string, context?: string) {
    // add your tailored logic here
    super.warn(`[warn] ${message}`, context);
  }

  error(message: string, trace?: string, context?: string) {
    // add your tailored logic here
    super.error(`[error] ${message}`, trace, context);
  }

}