From 36190a2cf2a9ec3fc4566402799001acb1f25e6f Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Sat, 30 Jul 2022 10:58:03 +0200 Subject: [PATCH] Set log level settings --- apps/api/src/main.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/api/src/main.ts b/apps/api/src/main.ts index 7b4ea21e9..fd8237cd2 100644 --- a/apps/api/src/main.ts +++ b/apps/api/src/main.ts @@ -5,7 +5,12 @@ import { AppModule } from './app/app.module'; import { environment } from './environments/environment'; async function bootstrap() { - const app = await NestFactory.create(AppModule); + const app = await NestFactory.create(AppModule, { + logger: + process.env.NODE_ENV === 'production' + ? ['error', 'log', 'warn'] + : ['debug', 'error', 'log', 'verbose', 'warn'] + }); app.enableCors(); app.enableVersioning({ defaultVersion: '1',