Logging err.stack

This commit is contained in:
Luis Fernando Molina committed 2019-08-12 11:08:10 +02:00
1 parent 1afc012a2f
commit 71f149f298
17 files changed
+185 -318

No files matched your search

+4 -4
View File
@@ -35,7 +35,7 @@ exports.newDebugLog = function newDebugLog() {
disableLogging = pdisableLogging
} catch (err) {
console.log("[ERROR] Debug Log -> initialize -> err = "+ err);
console.log("[ERROR] Debug Log -> initialize -> err = "+ err.stack);
}
}
@@ -94,7 +94,7 @@ exports.newDebugLog = function newDebugLog() {
function onFileCreated(err) {
if (err.result !== global.DEFAULT_OK_RESPONSE.result) {
console.log("[ERROR] DebugLog -> persist -> onInizialized -> onFileCreated -> err = "+ err);
console.log("[ERROR] DebugLog -> persist -> onInizialized -> onFileCreated -> err = "+ err.stack);
setTimeout(writeLog, 10000); // Lets retry until we make it.
return;
@@ -105,7 +105,7 @@ exports.newDebugLog = function newDebugLog() {
}
}
} catch (err) {
console.log("[ERROR] DebugLog -> persist -> err = "+ err);
console.log("[ERROR] DebugLog -> persist -> err = "+ err.stack);
console.log("[ERROR] DebugLog -> persist -> onInizialized -> contentToPersist = " + contentToPersist);
}
}
@@ -134,7 +134,7 @@ exports.newDebugLog = function newDebugLog() {
accumulatedLog = accumulatedLog + logLine;
} catch (err) {
console.log("[ERROR] DebugLog -> write -> err = "+ err);
console.log("[ERROR] DebugLog -> write -> err = "+ err.stack);
}
}