From c8052e0e0a33e714d8fdc73a533855aa746e29a4 Mon Sep 17 00:00:00 2001 From: igoroctaviano Date: Mon, 29 Jun 2020 11:57:16 -0300 Subject: [PATCH] Add context to hotkeys manager --- platform/core/src/classes/HotkeysManager.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/core/src/classes/HotkeysManager.js b/platform/core/src/classes/HotkeysManager.js index ee65f08a3..eb4c3ea2a 100644 --- a/platform/core/src/classes/HotkeysManager.js +++ b/platform/core/src/classes/HotkeysManager.js @@ -18,7 +18,7 @@ export class HotkeysManager { if (!commandsManager) { log.warn( - 'HotkeysManager instantiated without a commandsManager. Hotkeys will be unable to find and run commands.' + '[hotkeys] HotkeysManager instantiated without a commandsManager. Hotkeys will be unable to find and run commands.' ); } @@ -147,7 +147,7 @@ export class HotkeysManager { */ registerHotkeys({ commandName, keys, label } = {}, extension) { if (!commandName) { - log.warn(`No command was defined for hotkey "${keys}"`); + log.warn(`[hotkeys] No command was defined for hotkey "${keys}"`); return; } @@ -156,13 +156,13 @@ export class HotkeysManager { if (previouslyRegisteredDefinition) { const previouslyRegisteredKeys = previouslyRegisteredDefinition.keys; this._unbindHotkeys(commandName, previouslyRegisteredKeys); - log.info(`Unbinding ${commandName} from ${previouslyRegisteredKeys}`); + log.info(`[hotkeys] Unbinding ${commandName} from ${previouslyRegisteredKeys}`); } // Set definition & bind this.hotkeyDefinitions[commandName] = { keys, label }; this._bindHotkeys(commandName, keys); - log.info(`Binding ${commandName} to ${keys}`); + log.info(`[hotkeys] Binding ${commandName} to ${keys}`); } /**