Set appropiate log levels
FarmMaps.Develop/FarmMapsLib/develop This commit looks good Details

pull/1/head
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

@ -71,7 +71,7 @@ export class MapEffects {
startSearch$: Observable<Action> = this.actions$.pipe(
ofType(mapActions.STARTSEARCH),
switchMap((action: mapActions.StartSearch) => {
console.log("Start search");
console.debug("Start search");
var startDate = action.queryState.startDate;
var endDate = action.queryState.endDate;
var newAction;

View File

@ -268,7 +268,7 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
}
var selectedBaseLayer: IItemLayer = null;
var mapState = tassign(state.mapState);
console.log(`Base layerload: ${mapState.baseLayerCode}`)
console.debug(`Base layerload: ${mapState.baseLayerCode}`)
if (baseLayers.length > 0 && mapState.baseLayerCode != "") {
selectedBaseLayer = baseLayers.filter(layer => layer.item.code === mapState.baseLayerCode)[0];
selectedBaseLayer.visible = true;

View File

@ -24,7 +24,7 @@ export class GeolocationService {
observer.next(position);
},
(error: PositionError) => {
console.log('Geolocation service: ' + error.message);
console.debug('Geolocation service: ' + error.message);
observer.error(error);
},
{

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];
}

View File

@ -23,10 +23,4 @@
</li>
</ul>
</div>
<!--<div class="card menu-card">
<ul class="navbar-nav">
<li class="nav-item py-0"><a class="nav-link" href="#" (click)="handlePredefinedQuery($event,{itemType:'vnd.farmmaps.itemtype.croppingscheme'})"><span i18n>Farms</span></a></li>
<li class="nav-item py-0"><a class="nav-link" href="#" (click)="handlePredefinedQuery($event,{itemType:'vnd.farmmaps.itemtype.layer'})"><span i18n>Layers</span></a></li>
</ul>
</div>-->
</div>