loleaflet: simplify logException

Change-Id: I31bc41ba519f3bd5e5b873a836f6c8ed5bd842d5
Signed-off-by: Henry Castro <hcastro@collabora.com>
This commit is contained in:
Henry Castro 2021-08-06 15:37:21 -04:00
parent f915df9fd5
commit 7972485509

View file

@ -66,11 +66,9 @@ window.app = { // Shouldn't have any functions defined.
// except in tile debug mode (Ctrl-Shift-Alt-d)
console.log2 = console.log;
console.logException = function (err) {
var log = 'jsexception ' + JSON.stringify(err, null, 2) + '\n';
console.log2(err);
setTimeout(function() {
var log = 'jsexception ' + JSON.stringify(err, null, 2) + '\n';
global.logServer(log);
}, 0);
global.logServer(log);
};
if (global.loleafletLogging !== 'true') {