mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-27 08:58:40 +00:00
made logger static
This commit is contained in:
parent
560867ebfe
commit
d72a54b6a3
|
|
@ -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 || {}));
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
"use strict";
|
||||
window.addEventListener('error', function (e)
|
||||
{
|
||||
console.log(e.error);
|
||||
jsOMS.Log.Logger.instance.error(e.error);
|
||||
|
||||
return false;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@
|
|||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
jsOMS.Log.Logger.instance.error(e);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user