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 {