mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-02-14 08:28: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') {
|
} else if (typeof this.messages[key] !== 'undefined') {
|
||||||
this.messages[key].any(data);
|
this.messages[key].any(data);
|
||||||
} else {
|
} else {
|
||||||
console.log('does not exist');
|
jsOMS.Log.Logger.instance.warning('Undefined type: ' + key);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}(window.jsOMS = window.jsOMS || {}));
|
}(window.jsOMS = window.jsOMS || {}));
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@
|
||||||
console.log(action.type);
|
console.log(action.type);
|
||||||
|
|
||||||
if (!this.actions.hasOwnProperty(action.type)) {
|
if (!this.actions.hasOwnProperty(action.type)) {
|
||||||
console.log('Undefined action ' + action.type);
|
jsOMS.Log.Logger.instance.warning('Undefined action ' + action.type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
self.app.logger.error('Invalid form response. \n' +
|
jsOMS.Log.Logger.instance.error('Invalid form response. \n' +
|
||||||
'URL: ' + form.getAction() + '\n' +
|
'URL: ' + form.getAction() + '\n' +
|
||||||
'Request: ' + JSON.stringify(form.getData()) + '\n' +
|
'Request: ' + JSON.stringify(form.getData()) + '\n' +
|
||||||
'Response: ' + xhr.response
|
'Response: ' + xhr.response
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (exception) {
|
} catch (exception) {
|
||||||
self.app.logger.error('Invalid JSON object: ' + xhr, 'FormManager');
|
jsOMS.Log.Logger.instance.error('Invalid JSON object: ' + xhr, 'FormManager');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -80,11 +80,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.recognition.onnomatch = function(event) {
|
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) {
|
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";
|
"use strict";
|
||||||
window.addEventListener('error', function (e)
|
window.addEventListener('error', function (e)
|
||||||
{
|
{
|
||||||
console.log(e.error);
|
jsOMS.Log.Logger.instance.error(e.error);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
jsOMS.Log.Logger.instance.error(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user