Set appropiate log levels
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good

This commit is contained in:
Willem Dantuma
2019-11-06 09:08:42 +01:00
parent 9ebce8e0bb
commit 6ba1d39d31
8 changed files with 8 additions and 14 deletions

View File

@@ -51,7 +51,7 @@ export class AppComponent implements OnInit, OnDestroy {
getActionFromEvent(event: IEventMessage): Action {
var action: Action = null;
console.log(`${event.eventType} Event received`);
console.debug(`${event.eventType} Event received`);
switch (event.eventType) {
case "ItemChanged": {
action = new commonActions.ItemChangedEvent(event.itemCode, event.attributes);

View File

@@ -106,7 +106,7 @@ export class AppCommonEffects {
ofType(appCommonActions.FAIL),
map((action) => {
let failAction = action as appCommonActions.Fail;
console.log(failAction.payload)
console.debug(failAction.payload)
return null;
}));

View File

@@ -21,13 +21,13 @@ export function appConfigFactory(injector:Injector, appConfig: AppConfig, oauthS
return (): Promise<any> => {
return appConfig.load().then(() => {
oauthService.events.subscribe((event) => {
console.log(event.type);
console.debug(event.type);
if (event.type == 'token_error' || event.type == 'silent_refresh_timeout') {
let e = event as OAuthErrorEvent;
let p = e.params as any;
if (event.type == 'silent_refresh_timeout' || (p.error && p.error == 'login_required')) {
let router = injector.get(Router);
console.log("Session expired");
console.debug("Session expired");
router.navigate(['loggedout'], { queryParams: { redirectTo: router.url } });
}
}

View File

@@ -15,7 +15,7 @@ export class AppConfig {
public getConfig(key: any) {
if (!this.config.hasOwnProperty(key)) {
console.log(`Config key ${key} not set`);
console.error(`Config key ${key} not set`);
}
return this.config[key];
}