From 2eb88074db8823dfcb5d8c8c1dbccc1c91813c16 Mon Sep 17 00:00:00 2001 From: fantasticit Date: Sat, 30 Jul 2022 14:08:49 +0800 Subject: [PATCH] server: improve log --- packages/server/src/main.ts | 4 +++- packages/server/src/services/system.service.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/server/src/main.ts b/packages/server/src/main.ts index a0e0252..7496622 100644 --- a/packages/server/src/main.ts +++ b/packages/server/src/main.ts @@ -14,7 +14,9 @@ import helmet from 'helmet'; import { AppModule } from './app.module'; async function bootstrap() { - const app = await NestFactory.create(AppModule); + const app = await NestFactory.create(AppModule, { + logger: ['warn', 'error'], + }); const config = app.get(ConfigService); const port = config.get('server.port') || 5002; diff --git a/packages/server/src/services/system.service.ts b/packages/server/src/services/system.service.ts index b9bb65d..562cbcb 100644 --- a/packages/server/src/services/system.service.ts +++ b/packages/server/src/services/system.service.ts @@ -60,7 +60,7 @@ export class SystemService { : await this.systemRepo.create(emailConfig); await this.systemRepo.save(newConfig); - console.log('[think] 已载入文件配置:', newConfig); + console.log('[think] 已载入文件配置', JSON.stringify(newConfig, null, 2)); } /**