From bba8e0047bfd01b30aba11a2c08e3560e2a23ce7 Mon Sep 17 00:00:00 2001 From: richard-loafle <44828666+richard-loafle@users.noreply.github.com> Date: Thu, 6 Feb 2020 13:15:31 +0900 Subject: [PATCH] log level --- .../ucap-webmessenger-app/src/app/services/app.service.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/projects/ucap-webmessenger-app/src/app/services/app.service.ts b/projects/ucap-webmessenger-app/src/app/services/app.service.ts index 10f1dbf2..3b62e016 100644 --- a/projects/ucap-webmessenger-app/src/app/services/app.service.ts +++ b/projects/ucap-webmessenger-app/src/app/services/app.service.ts @@ -9,7 +9,9 @@ import { TranslateService as UCapTranslateService } from '@ucap-webmessenger/ui' import { DateService as UCapDateService } from '@ucap-webmessenger/ui'; import { TranslateService } from '@ngx-translate/core'; import { EnviromentsService } from '@ucap-webmessenger/enviroments'; -import { NGXLogger } from 'ngx-logger'; +import { NGXLogger, NgxLoggerLevel } from 'ngx-logger'; + +import { environment } from '../../environments/environment'; @Injectable() export class AppService { @@ -33,6 +35,10 @@ export class AppService { this.ucapDateService.setDefaultTimezone('Asia/Seoul'); this.ucapDateService.use('Asia/Seoul'); this.ucapDateService.setLocale(this.translateService.currentLang); + + this.logger.updateConfig({ + level: environment.production ? NgxLoggerLevel.WARN : NgxLoggerLevel.DEBUG + }); } public postInit(): Promise {