mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-21 18:55:19 -04:00
Add logger module and custom logger implementation
ConsoleLoggerService is based on the default Nest LoggerService, but adds the ability to give context about the function that is logging something. It also removes the `[Nest]` string and the PID at the beginning of each log line. NestConsoleLoggerService is a wrapper around ConsoleLoggerService and makes it possible to use our implementation as a default Nest LoggerService Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
743eb7469d
commit
b256fc8b36
3 changed files with 161 additions and 0 deletions
9
src/logger/logger.module.ts
Normal file
9
src/logger/logger.module.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
import { Module } from '@nestjs/common';
|
||||
import { ConsoleLoggerService } from './console-logger.service';
|
||||
import { NestConsoleLoggerService } from './nest-console-logger.service';
|
||||
|
||||
@Module({
|
||||
providers: [ConsoleLoggerService, NestConsoleLoggerService],
|
||||
exports: [ConsoleLoggerService, NestConsoleLoggerService],
|
||||
})
|
||||
export class LoggerModule {}
|
Loading…
Add table
Add a link
Reference in a new issue