From 877f77babdfc74b1f0af781f5b21b5a532f82ce5 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Sun, 16 Jul 2017 10:49:02 +0200 Subject: [PATCH] Configure Logger at app level. --- src/accounts/account.module.ts | 2 +- src/app.module.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/accounts/account.module.ts b/src/accounts/account.module.ts index 446286f..a684b94 100644 --- a/src/accounts/account.module.ts +++ b/src/accounts/account.module.ts @@ -11,7 +11,7 @@ import { AccountService } from './account.service'; @NgModule({ imports: [ HttpModule, - NgLoggerModule.forRoot(Level.LOG), + NgLoggerModule, RestangularModule ], providers: [ diff --git a/src/app.module.ts b/src/app.module.ts index 60dd482..164c27d 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -9,6 +9,7 @@ import { BrowserModule } from '@angular/platform-browser'; import { UpgradeModule } from '@angular/upgrade/static'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; +import { NgLoggerModule, Level } from '@nsalaun/ng-logger'; import { RestangularModule } from 'ngx-restangular'; import { AccountModule } from './accounts/account.module'; @@ -19,6 +20,7 @@ import { ApiBaseURL } from './app.config'; BrowserModule, UpgradeModule, AccountModule, + NgLoggerModule.forRoot(Level.LOG), RestangularModule.forRoot((RestangularProvider) => { RestangularProvider.setBaseUrl(ApiBaseURL);