Better Logging
This commit is contained in:
1 parent
f18f86fa17
commit
a2136f90f1
3 files changed
+7
-3
No files matched your search
+5
-1
@@ -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;
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user