diff --git a/Message/Response/ResponseManager.js b/Message/Response/ResponseManager.js index f8b1464..e1efa18 100644 --- a/Message/Response/ResponseManager.js +++ b/Message/Response/ResponseManager.js @@ -68,7 +68,7 @@ } else if (typeof this.messages[key] !== 'undefined') { this.messages[key].any(data); } else { - console.log('does not exist'); + jsOMS.Log.Logger.instance.warning('Undefined type: ' + key); } }; }(window.jsOMS = window.jsOMS || {})); diff --git a/UI/ActionManager.js b/UI/ActionManager.js index 2fe7c3d..cda5a4e 100644 --- a/UI/ActionManager.js +++ b/UI/ActionManager.js @@ -154,7 +154,7 @@ console.log(action.type); if (!this.actions.hasOwnProperty(action.type)) { - console.log('Undefined action ' + action.type); + jsOMS.Log.Logger.instance.warning('Undefined action ' + action.type); return; } diff --git a/UI/Component/Form.js b/UI/Component/Form.js index e8c82c1..9bd0c29 100644 --- a/UI/Component/Form.js +++ b/UI/Component/Form.js @@ -221,7 +221,7 @@ } } } catch (e) { - self.app.logger.error('Invalid form response. \n' + + jsOMS.Log.Logger.instance.error('Invalid form response. \n' + 'URL: ' + form.getAction() + '\n' + 'Request: ' + JSON.stringify(form.getData()) + '\n' + 'Response: ' + xhr.response diff --git a/UI/Component/Input.js b/UI/Component/Input.js index 50c8d63..98d7b29 100644 --- a/UI/Component/Input.js +++ b/UI/Component/Input.js @@ -132,7 +132,7 @@ } } } catch (exception) { - self.app.logger.error('Invalid JSON object: ' + xhr, 'FormManager'); + jsOMS.Log.Logger.instance.error('Invalid JSON object: ' + xhr, 'FormManager'); return false; } }); diff --git a/UI/Input/Voice/VoiceManager.js b/UI/Input/Voice/VoiceManager.js index 305cb2d..04dda30 100644 --- a/UI/Input/Voice/VoiceManager.js +++ b/UI/Input/Voice/VoiceManager.js @@ -80,11 +80,11 @@ } this.recognition.onnomatch = function(event) { - console.log('Couldn\'t recognize speech'); + jsOMS.Log.Logger.instance.warning('Couldn\'t recognize speech'); } this.recognition.onerror = function(event) { - console.log('Error during speech recognition: ' + event.error); + jsOMS.Log.Logger.instance.warning('Error during speech recognition: ' + event.error); } }; diff --git a/UnhandledException.js b/UnhandledException.js index 4cc567c..7efdfee 100644 --- a/UnhandledException.js +++ b/UnhandledException.js @@ -13,7 +13,7 @@ "use strict"; window.addEventListener('error', function (e) { - console.log(e.error); + jsOMS.Log.Logger.instance.error(e.error); return false; }); diff --git a/Views/FormView.js b/Views/FormView.js index c2bf57a..4a9c473 100644 --- a/Views/FormView.js +++ b/Views/FormView.js @@ -207,7 +207,7 @@ } } } catch (e) { - console.log(e); + jsOMS.Log.Logger.instance.error(e); } return true;