From 470697d364a658babfd4ee9f22f3c0edfa218dde Mon Sep 17 00:00:00 2001 From: Italo A Date: Sat, 11 Nov 2023 09:35:55 -0300 Subject: [PATCH] feat: more logger configs --- backend/src/app.module.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/src/app.module.ts b/backend/src/app.module.ts index f61e23aa..186b8464 100644 --- a/backend/src/app.module.ts +++ b/backend/src/app.module.ts @@ -15,10 +15,15 @@ import { LoggerModule } from 'nestjs-pino'; imports: [ LoggerModule.forRoot({ pinoHttp: { + level: process.env.NODE_ENV !== 'production' ? 'debug' : 'info', transport: { target: 'pino-pretty', options: { singleLine: true, + levelFirst: true, + colorize: true, + // translateTime for São Paulo timezone into a pretty format + translateTime: 'SYS:dd/mm/yyyy HH:MM:ss', }, }, },