Better Logging

This commit is contained in:
Luis Fernando Molina committed 2019-09-11 19:30:12 +02:00
1 parent f18f86fa17
commit a2136f90f1
3 files changed
+7 -3

No files matched your search

+5 -1
View File
@@ -130,7 +130,11 @@ exports.newDebugLog = function newDebugLog() {
let logLine = '\r\n' + message;
if (process.env.CONSOLE_LOG === "true" || message.indexOf("ERROR") > 0) {
console.log(message)
let key = ''
if (thisObject.bot) {
key = thisObject.bot.devTeam + '-' + thisObject.bot.codeName + '-' + thisObject.bot.process
}
console.log(message + ' @ ' + key)
}
accumulatedLog = accumulatedLog + logLine;
+1 -1
View File
@@ -663,7 +663,7 @@
function exitProcessInstance() {
global.ENDED_PROCESSES_COUNTER++
console.log("[INFO] Task Server -> exitProcessInstance -> Process #" + global.ENDED_PROCESSES_COUNTER + " from " + global.TOTAL_PROCESS_INSTANCES_CREATED + ' exiting.');
console.log("[INFO] Task Server -> " + global.USER_DEFINITION.name + " -> exitProcessInstance -> Process #" + global.ENDED_PROCESSES_COUNTER + " from " + global.TOTAL_PROCESS_INSTANCES_CREATED + " exiting.");
if (global.ENDED_PROCESSES_COUNTER === global.TOTAL_PROCESS_INSTANCES_CREATED) {
global.EXIT_NODE_PROCESS()
+1 -1
View File
@@ -129,7 +129,7 @@ global.EXIT_NODE_PROCESS = function exitProcess() {
global.SYSTEM_EVENT_HANDLER.finalize()
global.SYSTEM_EVENT_HANDLER = undefined
console.log("[INFO] Task Server -> exitProcessInstance -> Task Server Stopped.");
console.log("[INFO] Task Server -> " + global.USER_DEFINITION.name + " -> EXIT_NODE_PROCESS -> Task Server Stopped.");
process.exit()
}