Logs Cleaned
This commit is contained in:
1 parent
a44c92954a
commit
e0fa02b38c
10 files changed
+13
-64
No files matched your search
+1
-1
@@ -75,7 +75,7 @@
|
||||
return
|
||||
}
|
||||
if (outputDatasetNode.referenceParent.parentNode.dataBuilding === undefined) {
|
||||
logger.write(MODULE_NAME, "[WARN] start -> Product Definition " + outputDatasetNode.referenceParent.parentNode.name + " without a Data Building Procedure. Product Definition = " + JSON.stringify(outputDatasetNode.referenceParent.parentNode));
|
||||
logger.write(MODULE_NAME, "[WARN] start -> Product Definition " + outputDatasetNode.referenceParent.parentNode.name + " without a Data Building Procedure. Product Definition Name = " + outputDatasetNode.referenceParent.parentNode.name);
|
||||
}
|
||||
if (outputDatasetNode.referenceParent.config.codeName === undefined) {
|
||||
logger.write(MODULE_NAME, "[ERROR] start -> Dataset witn no codeName defined. Product Dataset = " + JSON.stringify(outputDatasetNode.referenceParent));
|
||||
|
||||
+7
-13
@@ -4,12 +4,12 @@
|
||||
const LOG_FILE_CONTENT = false;
|
||||
const MODULE_NAME = "Data Dependencies";
|
||||
|
||||
let bot = BOT
|
||||
let bot = BOT
|
||||
|
||||
let thisObject = {
|
||||
nodeArray: undefined,
|
||||
dataSetsModulesArray: [],
|
||||
isItADepenency: isItADepenency,
|
||||
isItADepenency: isItADepenency,
|
||||
initialize: initialize,
|
||||
finalize: finalize
|
||||
};
|
||||
@@ -21,9 +21,6 @@
|
||||
function initialize(callBackFunction) {
|
||||
|
||||
try {
|
||||
|
||||
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] initialize -> Entering function."); }
|
||||
|
||||
/* Basic Valdidations */
|
||||
if (bot.processNode.referenceParent.processDependencies !== undefined) {
|
||||
if (bot.processNode.referenceParent.processDependencies.dataDependencies !== undefined) {
|
||||
@@ -51,7 +48,7 @@
|
||||
if (bot.DEPENDENCY_FILTER !== undefined) {
|
||||
for (let i = 0; i < bot.DEPENDENCY_FILTER.length; i++) {
|
||||
let key = bot.DEPENDENCY_FILTER[i]
|
||||
filter.set(key, true)
|
||||
filter.set(key, true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +67,7 @@
|
||||
function onInitilized(err) {
|
||||
|
||||
if (err.result !== global.DEFAULT_OK_RESPONSE.result) {
|
||||
logger.write(MODULE_NAME, "[ERROR] initialize -> onInitilized -> err = "+ JSON.stringify(err));
|
||||
logger.write(MODULE_NAME, "[ERROR] initialize -> onInitilized -> err = " + JSON.stringify(err));
|
||||
|
||||
alreadyCalledBack = true;
|
||||
callBackFunction(err);
|
||||
@@ -81,9 +78,6 @@
|
||||
}
|
||||
|
||||
function addDataSet() {
|
||||
|
||||
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] initialize -> addDataSet -> Entering function."); }
|
||||
|
||||
addCount++;
|
||||
|
||||
thisObject.dataSetsModulesArray.push(dataSetModule);
|
||||
@@ -99,14 +93,14 @@
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
logger.write(MODULE_NAME, "[ERROR] initialize -> err = "+ err.stack);
|
||||
logger.write(MODULE_NAME, "[ERROR] initialize -> err = " + err.stack);
|
||||
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
|
||||
}
|
||||
}
|
||||
|
||||
function finalize() {
|
||||
for (let i = 0; i < thisObject.dataSetsModulesArray.length; i++) {
|
||||
let dataSetModule = thisObject.dataSetsModulesArray[i]
|
||||
let dataSetModule = thisObject.dataSetsModulesArray[i]
|
||||
dataSetModule.finalize()
|
||||
}
|
||||
thisObject.dataSetsModulesArray = undefined
|
||||
@@ -115,7 +109,7 @@
|
||||
}
|
||||
|
||||
function isItADepenency(timeFrame, product) {
|
||||
let key = timeFrame + '-' + product
|
||||
let key = timeFrame + '-' + product
|
||||
|
||||
return filter.get(key)
|
||||
}
|
||||
|
||||
@@ -23,9 +23,6 @@ exports.newDataSet = function newDataSet(BOT, logger) {
|
||||
function initialize(dataDependency, callBackFunction) {
|
||||
|
||||
try {
|
||||
|
||||
if (global.LOG_CONTROL[MODULE_NAME].logInfo === true) { logger.write(MODULE_NAME, "[INFO] initialize -> Entering function."); }
|
||||
|
||||
thisObject.node = dataDependency.referenceParent;
|
||||
logger.fileName = MODULE_NAME + "." + thisObject.node.type + "." + thisObject.node.name + "." + thisObject.node.id;
|
||||
|
||||
|
||||
@@ -31,9 +31,6 @@ exports.newFileStorage = function newFileStorage(logger, host, port) {
|
||||
recursiveGetTextFile(filePath, callBackFunction, noRetry, canUsePrevious)
|
||||
|
||||
function recursiveGetTextFile(filePath, callBackFunction, noRetry, canUsePrevious) {
|
||||
|
||||
logger.write(MODULE_NAME, '[INFO] FileStorage -> getTextFile -> Entering Function.')
|
||||
|
||||
let fileDoesNotExist = false
|
||||
|
||||
/* Choose path for either bots or data */
|
||||
|
||||
@@ -24,14 +24,10 @@
|
||||
}
|
||||
|
||||
function initialize(callBackFunction) {
|
||||
|
||||
try {
|
||||
|
||||
logger.fileName = MODULE_NAME;
|
||||
logger.initialize();
|
||||
|
||||
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] initialize -> Entering function."); }
|
||||
|
||||
callBackFunction(global.DEFAULT_OK_RESPONSE);
|
||||
|
||||
} catch (err) {
|
||||
|
||||
@@ -81,7 +81,7 @@ exports.newTradingOrders = function newTradingOrders(bot, logger, tradingEngineM
|
||||
try {
|
||||
if (tradingEngineOrder.status === undefined) { continue }
|
||||
} catch (err) {
|
||||
|
||||
console.log(err.stack)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,11 +29,7 @@
|
||||
return thisObject;
|
||||
|
||||
function initialize(callBackFunction) {
|
||||
|
||||
try {
|
||||
|
||||
if (global.LOG_CONTROL[MODULE_NAME].logInfo === true) { logger.write(MODULE_NAME, "[INFO] initialize -> Entering function."); }
|
||||
|
||||
let name = 'Not Depends on any Process'
|
||||
logger.fileName = MODULE_NAME + "." + name;
|
||||
|
||||
|
||||
@@ -56,50 +56,29 @@
|
||||
/* Global control of logging. */
|
||||
|
||||
global.LOG_CONTROL = {
|
||||
"Assistant": {
|
||||
logInfo: true,
|
||||
logWarnings: false,
|
||||
logErrors: true,
|
||||
logContent: false,
|
||||
intensiveLogging: false
|
||||
},
|
||||
"Exchange API": {
|
||||
logInfo: true,
|
||||
logWarnings: false,
|
||||
logErrors: true,
|
||||
logContent: false,
|
||||
intensiveLogging: false
|
||||
},
|
||||
"Status Report": {
|
||||
logInfo: true,
|
||||
logInfo: false,
|
||||
logWarnings: false,
|
||||
logErrors: true,
|
||||
logContent: false,
|
||||
intensiveLogging: false
|
||||
},
|
||||
"Dataset": {
|
||||
logInfo: true,
|
||||
logWarnings: false,
|
||||
logErrors: true,
|
||||
logContent: false,
|
||||
intensiveLogging: false
|
||||
},
|
||||
"Context": {
|
||||
logInfo: true,
|
||||
logInfo: false,
|
||||
logWarnings: false,
|
||||
logErrors: true,
|
||||
logContent: false,
|
||||
intensiveLogging: false
|
||||
},
|
||||
"Process Execution Events": {
|
||||
logInfo: true,
|
||||
logInfo: false,
|
||||
logWarnings: false,
|
||||
logErrors: true,
|
||||
logContent: false,
|
||||
intensiveLogging: false
|
||||
},
|
||||
"Process Output": {
|
||||
logInfo: true,
|
||||
logInfo: false,
|
||||
logWarnings: false,
|
||||
logErrors: true,
|
||||
logContent: false,
|
||||
|
||||
@@ -18,11 +18,7 @@
|
||||
return thisObject;
|
||||
|
||||
function initialize(callBackFunction) {
|
||||
|
||||
try {
|
||||
|
||||
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] initialize -> Entering function."); }
|
||||
|
||||
/* Basic Valdidations */
|
||||
if (bot.processNode.referenceParent.processDependencies !== undefined) {
|
||||
if (bot.processNode.referenceParent.processDependencies.statusDependencies !== undefined) {
|
||||
@@ -88,9 +84,6 @@
|
||||
|
||||
switch (err.message) {
|
||||
case global.DEFAULT_OK_RESPONSE.message: {
|
||||
|
||||
if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] initialize -> onLoad -> Execution finished well. -> Status Dependency = " + JSON.stringify(statusDependency.dependency)) }
|
||||
|
||||
addReport();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -39,10 +39,7 @@
|
||||
return thisObject;
|
||||
|
||||
function initialize(pStatusDependencyNode, callBackFunction) {
|
||||
|
||||
try {
|
||||
if (global.LOG_CONTROL[MODULE_NAME].logInfo === true) { logger.write(MODULE_NAME, "[INFO] initialize -> Entering function."); }
|
||||
|
||||
statusDependencyNode = pStatusDependencyNode;
|
||||
logger.fileName = MODULE_NAME + "." + statusDependencyNode.type + "." + statusDependencyNode.name + "." + statusDependencyNode.id;
|
||||
|
||||
|
||||
Reference in new issue
Block a user