diff --git a/DebugLog.js b/DebugLog.js index cf1a694c1..e996fe4dd 100644 --- a/DebugLog.js +++ b/DebugLog.js @@ -69,7 +69,11 @@ exports.newDebugLog = function newDebugLog() { let filePath = thisObject.bot.filePathRoot + "/Logs/" + thisObject.bot.process + "/" if (thisObject.bot.SESSION !== undefined) { - filePath = filePath + thisObject.bot.SESSION.id + "/" + executionDatetime; + if (thisObject.bot.SESSION.code.folderName === undefined) { + filePath = filePath + thisObject.bot.SESSION.id + "/" + executionDatetime; + } else { + filePath = filePath + thisObject.bot.SESSION.code.folderName + "/" + executionDatetime; + } } else { filePath = filePath + executionDatetime; } diff --git a/Session.js b/Session.js index 5ff67d6f6..181a0b726 100644 --- a/Session.js +++ b/Session.js @@ -16,7 +16,8 @@ /* Initialize this info so that everything is logged propeerly */ bot.SESSION = { name: bot.processNode.session.name, - id: bot.processNode.session.id + id: bot.processNode.session.id, + code: bot.processNode.session.code } /* Check if there is a session */