From 88faef416eadc891537f03926160e35245125c72 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Sun, 18 Mar 2018 16:37:21 +0100 Subject: Replace console logs with debugger --- src/stores/ServicesStore.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/stores/ServicesStore.js') diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index c38d0d9ee..0d9ff7f9b 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js @@ -10,6 +10,8 @@ import CachedRequest from './lib/CachedRequest'; import { matchRoute } from '../helpers/routing-helpers'; import { gaEvent } from '../lib/analytics'; +const debug = require('debug')('ServiceStore'); + export default class ServicesStore extends Store { @observable allServicesRequest = new CachedRequest(this.api.services, 'all'); @observable createServiceRequest = new Request(this.api.services, 'create'); @@ -103,7 +105,7 @@ export default class ServicesStore extends Store { return activeService; } - console.warn('Service not available'); + debug('Service not available'); } return null; @@ -117,10 +119,10 @@ export default class ServicesStore extends Store { const recipesStore = this.stores.recipes; if (recipesStore.isInstalled(recipeId)) { - console.debug('Recipe is installed'); + debug(`Recipe ${recipeId} is installed`); this._redirectToAddServiceRoute(recipeId); } else { - console.warn('Recipe is not installed'); + debug(`Recipe ${recipeId} is not installed`); // We access the RecipeStore action directly // returns Promise instead of action await this.stores.recipes._install({ recipeId }); @@ -487,7 +489,7 @@ export default class ServicesStore extends Store { if (service) { service.webview.openDevTools(); } else { - console.warn('No service is active'); + debug('No service is active'); } } -- cgit v1.2.3-54-g00ecf