PROCESS INSTANCE LOGGER cleaned
This commit is contained in:
1 parent
28f4c56d56
commit
103e4d0cce
68 files changed
+172
-188
No files matched your search
+2
-2
@@ -32,8 +32,8 @@
|
||||
|
||||
try {
|
||||
|
||||
logger.fileName = MODULE_NAME;
|
||||
logger.initialize();
|
||||
|
||||
|
||||
|
||||
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] initialize -> Entering function."); }
|
||||
|
||||
|
||||
+2
-2
@@ -26,8 +26,8 @@
|
||||
|
||||
try {
|
||||
|
||||
logger.fileName = MODULE_NAME;
|
||||
logger.initialize();
|
||||
|
||||
|
||||
|
||||
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] initialize -> Entering function."); }
|
||||
|
||||
|
||||
+2
-2
@@ -34,8 +34,8 @@
|
||||
|
||||
try {
|
||||
|
||||
logger.fileName = MODULE_NAME;
|
||||
logger.initialize();
|
||||
|
||||
|
||||
|
||||
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] initialize -> Entering function."); }
|
||||
|
||||
|
||||
+2
-2
@@ -34,8 +34,8 @@
|
||||
|
||||
try {
|
||||
|
||||
logger.fileName = MODULE_NAME;
|
||||
logger.initialize();
|
||||
|
||||
|
||||
|
||||
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] initialize -> Entering function."); }
|
||||
|
||||
|
||||
+2
-2
@@ -49,8 +49,8 @@ exports.newUserBot = function (processIndex, logger, COMMONS, UTILITIES, FILE_ST
|
||||
|
||||
try {
|
||||
|
||||
logger.fileName = MODULE_NAME;
|
||||
logger.initialize();
|
||||
|
||||
|
||||
|
||||
statusDependencies = pStatusDependencies;
|
||||
|
||||
|
||||
+2
-2
@@ -44,8 +44,8 @@ exports.newUserBot = function (processIndex, logger, COMMONS, UTILITIES, FILE_ST
|
||||
function initialize(pStatusDependencies, callBackFunction) {
|
||||
try {
|
||||
|
||||
logger.fileName = MODULE_NAME;
|
||||
logger.initialize();
|
||||
|
||||
|
||||
|
||||
statusDependencies = pStatusDependencies;
|
||||
|
||||
|
||||
+2
-2
@@ -20,8 +20,8 @@ exports.newUserBot = function (processIndex, logger, COMMONS, UTILITIES, FILE_ST
|
||||
function initialize(pStatusDependencies, callBackFunction) {
|
||||
try {
|
||||
|
||||
logger.fileName = MODULE_NAME;
|
||||
logger.initialize();
|
||||
|
||||
|
||||
|
||||
statusDependencies = pStatusDependencies;
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
const ERROR_LOG = true;
|
||||
const INTENSIVE_LOG = false;
|
||||
const logger = newWebDebugLog();
|
||||
logger.fileName = MODULE_NAME;
|
||||
|
||||
|
||||
let thisObject = {
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
const ERROR_LOG = true;
|
||||
const INTENSIVE_LOG = false;
|
||||
const logger = newWebDebugLog();
|
||||
logger.fileName = MODULE_NAME;
|
||||
|
||||
|
||||
let thisObject = {
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
const ERROR_LOG = true;
|
||||
const INTENSIVE_LOG = false;
|
||||
const logger = newWebDebugLog();
|
||||
logger.fileName = MODULE_NAME;
|
||||
|
||||
|
||||
let thisObject = {
|
||||
initialize: initialize,
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
const ERROR_LOG = true;
|
||||
const INTENSIVE_LOG = false;
|
||||
const logger = newWebDebugLog();
|
||||
logger.fileName = MODULE_NAME;
|
||||
|
||||
|
||||
let thisObject = {
|
||||
|
||||
|
||||
Whitespace-only changes.
@@ -58,7 +58,7 @@ exports.newSuperalgosFunctionLibrariesSessionFunctions = function () {
|
||||
}
|
||||
}
|
||||
|
||||
function sessionError(processIndex, node, errorMessage, logger) {
|
||||
function sessionError(processIndex, node, errorMessage) {
|
||||
let event
|
||||
if (node !== undefined) {
|
||||
event = {
|
||||
@@ -76,13 +76,11 @@ exports.newSuperalgosFunctionLibrariesSessionFunctions = function () {
|
||||
|
||||
if (TS.projects.superalgos.globals.taskVariables.IS_TASK_STOPPING === true) {
|
||||
TS.projects.superalgos.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).IS_SESSION_STOPPING = true
|
||||
if (logger !== undefined) {
|
||||
logger.write(MODULE_NAME, '[IMPORTANT] sessionError -> Stopping the Session now. ')
|
||||
}
|
||||
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).PROCESS_INSTANCE_LOGGER_MODULE.write(MODULE_NAME, '[IMPORTANT] sessionError -> Stopping the Session now. ')
|
||||
}
|
||||
}
|
||||
|
||||
function sessionWarning(processIndex, node, warningMessage, logger) {
|
||||
function sessionWarning(processIndex, node, warningMessage) {
|
||||
let event
|
||||
if (node !== undefined) {
|
||||
event = {
|
||||
@@ -100,13 +98,11 @@ exports.newSuperalgosFunctionLibrariesSessionFunctions = function () {
|
||||
|
||||
if (TS.projects.superalgos.globals.taskVariables.IS_TASK_STOPPING === true) {
|
||||
TS.projects.superalgos.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).IS_SESSION_STOPPING = true
|
||||
if (logger !== undefined) {
|
||||
logger.write(MODULE_NAME, '[IMPORTANT] sessionWarning -> Stopping the Session now. ')
|
||||
}
|
||||
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).PROCESS_INSTANCE_LOGGER_MODULE.write(MODULE_NAME, '[IMPORTANT] sessionWarning -> Stopping the Session now. ')
|
||||
}
|
||||
}
|
||||
|
||||
function sessionInfo(processIndex, node, infoMessage, logger) {
|
||||
function sessionInfo(processIndex, node, infoMessage) {
|
||||
let event
|
||||
if (node !== undefined) {
|
||||
event = {
|
||||
@@ -124,9 +120,7 @@ exports.newSuperalgosFunctionLibrariesSessionFunctions = function () {
|
||||
|
||||
if (TS.projects.superalgos.globals.taskVariables.IS_TASK_STOPPING === true) {
|
||||
TS.projects.superalgos.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).IS_SESSION_STOPPING = true
|
||||
if (logger !== undefined) {
|
||||
logger.write(MODULE_NAME, '[IMPORTANT] sessionInfo -> Stopping the Session now. ')
|
||||
}
|
||||
TS.projects.superalgos.globals.loggerVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).PROCESS_INSTANCE_LOGGER_MODULE.write(MODULE_NAME, '[IMPORTANT] sessionInfo -> Stopping the Session now. ')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
exports.newSuperalgosGlobalsLoggerVariables = function () {
|
||||
let thisObject = {
|
||||
DELETE_QUEUE_SIZE: 10
|
||||
DELETE_QUEUE_SIZE: 10,
|
||||
VARIABLES_BY_PROCESS_INDEX_MAP: new Map()
|
||||
}
|
||||
|
||||
/*
|
||||
VARIABLES_BY_PROCESS_INDEX_MAP
|
||||
|
||||
For each processIndex we will keep here the following variables.
|
||||
|
||||
PROCESS_INSTANCE_LOGGER_MODULE This is the logger module used by the process instance.
|
||||
BOT_MAIN_LOOP_LOGGER_MODULE This is the logger module instantiated at every main loop and used at downstream modules.
|
||||
|
||||
*/
|
||||
return thisObject
|
||||
}
|
||||
@@ -2,7 +2,7 @@ function newSuperalgosFunctionLibraryNodeCloning() {
|
||||
const MODULE_NAME = 'Node Cloning'
|
||||
const ERROR_LOG = true
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
thisObject = {
|
||||
getNodeClone: getNodeClone
|
||||
|
||||
@@ -2,7 +2,7 @@ function newSuperalgosFunctionLibraryProtocolNode() {
|
||||
const MODULE_NAME = 'Protocol Node'
|
||||
const ERROR_LOG = true
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
thisObject = {
|
||||
getProtocolNode: getProtocolNode
|
||||
|
||||
@@ -10,7 +10,7 @@ function newSuperalgosChartingSpace() {
|
||||
const MODULE_NAME = 'Charting Space'
|
||||
const ERROR_LOG = true
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
visible: false,
|
||||
|
||||
@@ -2,7 +2,7 @@ function newPlottersManager() {
|
||||
const MODULE_NAME = 'Plotters Manager'
|
||||
const ERROR_LOG = true
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let timeFrame = INITIAL_TIME_PERIOD
|
||||
let datetime = NEW_SESSION_INITIAL_DATE
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function newNodesAnnouncements() {
|
||||
const MODULE_NAME = 'Nodes Announcements'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function newNodesErrors() {
|
||||
const MODULE_NAME = 'Nodes Errors'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function newNodesHighlights() {
|
||||
const MODULE_NAME = 'Nodes Highlights'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function newNodesInfos() {
|
||||
const MODULE_NAME = 'Nodes Infos'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function newNodesProgress() {
|
||||
const MODULE_NAME = 'Nodes Progress'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function newNodesRunning() {
|
||||
const MODULE_NAME = 'Nodes Running'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function newNodesStatus() {
|
||||
const MODULE_NAME = 'Nodes Status'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function newNodesValues() {
|
||||
const MODULE_NAME = 'Nodes Values'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function newNodesWarnings() {
|
||||
const MODULE_NAME = 'Nodes Warnings'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
|
||||
@@ -2,7 +2,7 @@ function newPlotter() {
|
||||
const MODULE_NAME = 'Plotter'
|
||||
const ERROR_LOG = true
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
currentRecord: undefined,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function newRecordValues() {
|
||||
const MODULE_NAME = 'Record Values'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
onRecordChange: onRecordChange,
|
||||
|
||||
@@ -12,7 +12,7 @@ each one with it own timelineCharts, and each one positioned at an especific poi
|
||||
function newTimeMachine() {
|
||||
const MODULE_NAME = 'Time Machine'
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let timeFrame = INITIAL_TIME_PERIOD
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ function newTimelineChart() {
|
||||
const MODULE_NAME = 'Timeline Chart'
|
||||
|
||||
let logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let timeFrame = INITIAL_TIME_PERIOD
|
||||
let datetime = NEW_SESSION_INITIAL_DATE
|
||||
|
||||
@@ -3,7 +3,7 @@ function newWorkspace() {
|
||||
const MODULE_NAME = 'Workspace'
|
||||
const ERROR_LOG = true
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
workspaceNode: undefined,
|
||||
|
||||
@@ -17,7 +17,7 @@ function newFloatingLayer() {
|
||||
const MODULE_NAME = 'Floating Layer'
|
||||
const ERROR_LOG = true
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
addFloatingObject: addFloatingObject,
|
||||
|
||||
@@ -4,7 +4,7 @@ function newFloatingObject() {
|
||||
const ERROR_LOG = true
|
||||
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
fitFunction: undefined,
|
||||
|
||||
@@ -4,7 +4,7 @@ function newUiObject() {
|
||||
const ERROR_LOG = true
|
||||
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
fitFunction: undefined,
|
||||
|
||||
@@ -3,7 +3,7 @@ function newUiObjectConstructor() {
|
||||
const MODULE_NAME = 'UI Object Constructor'
|
||||
const ERROR_LOG = true
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
createUiObject: createUiObject,
|
||||
|
||||
@@ -4,7 +4,7 @@ function newUiObjectTitle() {
|
||||
const ERROR_LOG = true
|
||||
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
fitFunction: undefined,
|
||||
|
||||
@@ -2,7 +2,7 @@ function newLayer() {
|
||||
const MODULE_NAME = 'Layer'
|
||||
const ERROR_LOG = true
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
container: undefined,
|
||||
|
||||
@@ -3,7 +3,7 @@ function newPlotterPanel() {
|
||||
const MODULE_NAME = 'Plotter Panel'
|
||||
const ERROR_LOG = true
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
fitFunction: undefined,
|
||||
|
||||
@@ -2,7 +2,7 @@ function newListItem() {
|
||||
const MODULE_NAME = 'List Item'
|
||||
const ERROR_LOG = true
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
container: undefined,
|
||||
|
||||
@@ -2,7 +2,7 @@ function newListView() {
|
||||
const MODULE_NAME = 'List View'
|
||||
const ERROR_LOG = true
|
||||
const logger = newWebDebugLog()
|
||||
logger.fileName = MODULE_NAME
|
||||
|
||||
|
||||
let thisObject = {
|
||||
fitFunction: undefined,
|
||||
|
||||
Reference in new issue
Block a user