made logger static

This commit is contained in:
Dennis Eichhorn 2017-09-08 19:54:54 +02:00
parent 560867ebfe
commit d72a54b6a3
7 changed files with 8 additions and 8 deletions

View File

@ -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 || {}));

View File

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

View File

@ -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

View File

@ -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;
}
});

View File

@ -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);
}
};

View File

@ -13,7 +13,7 @@
"use strict";
window.addEventListener('error', function (e)
{
console.log(e.error);
jsOMS.Log.Logger.instance.error(e.error);
return false;
});

View File

@ -207,7 +207,7 @@
}
}
} catch (e) {
console.log(e);
jsOMS.Log.Logger.instance.error(e);
}
return true;