diff --git a/TaskServer/DebugLog.js b/TaskServer/DebugLog.js index e7c874e9b..a1ef69a37 100644 --- a/TaskServer/DebugLog.js +++ b/TaskServer/DebugLog.js @@ -101,7 +101,7 @@ exports.newDebugLog = function newDebugLog() { writeLog(); /* This is the implementation of the mechanism to auto-mantain logs. */ - if (contentToPersist.indexOf('[ERROR]') < 0 && contentToPersist.indexOf('[PERSIST]') < 0) { + if (contentToPersist.indexOf('[ERROR]') < 0 && contentToPersist.indexOf('[PERSIST]') < 0 && contentToPersist.indexOf('[IMPORTANT]') < 0) { thisObject.bot.LOGS_TO_DELETE_QUEUE.push(filePath + '/' + fileName) } if (thisObject.bot.LOGS_TO_DELETE_QUEUE.length > thisObject.bot.DELETE_QUEUE_SIZE) { diff --git a/TaskServer/LowFrequencyTrading/TradingSimulation.js b/TaskServer/LowFrequencyTrading/TradingSimulation.js index fe81e4a1e..0ee2844a7 100644 --- a/TaskServer/LowFrequencyTrading/TradingSimulation.js +++ b/TaskServer/LowFrequencyTrading/TradingSimulation.js @@ -73,6 +73,7 @@ exports.newTradingSimulation = function newTradingSimulation(bot, logger, tradin meaning that the dataSet needs to be updated with more up-to-date data. */ bot.SESSION.stop('Data is not up-to-date enough. Please start the Masters Data Mining Operation.') + if (FULL_LOG === true) { logger.write(MODULE_NAME, '[IMPORTANT] runSimulation -> Data is not up-to-date enough. Stopping the Session now. ' ) } return } } else { @@ -213,6 +214,7 @@ exports.newTradingSimulation = function newTradingSimulation(bot, logger, tradin closeEpisode('Final Datetime Reached') breakLoop = true bot.SESSION.stop('Final Datetime Reached') + if (FULL_LOG === true) { logger.write(MODULE_NAME, '[IMPORTANT] runSimulation -> Final Datetime Reached. Stopping the Session now. ' ) } return } @@ -220,6 +222,7 @@ exports.newTradingSimulation = function newTradingSimulation(bot, logger, tradin closeEpisode('Min or Max Balance Reached') breakLoop = true bot.SESSION.stop('Min or Max Balance Reached') + if (FULL_LOG === true) { logger.write(MODULE_NAME, '[IMPORTANT] runSimulation -> Min or Max Balance Reached. Stopping the Session now. ' ) } return } }