diff --git a/MultiPeriod.js b/MultiPeriod.js index 672b631ac..2392fa451 100644 --- a/MultiPeriod.js +++ b/MultiPeriod.js @@ -452,11 +452,7 @@ bot.multiPeriodProcessDatetime = new Date(bot.multiPeriodProcessDatetime.valueOf() + ONE_DAY_IN_MILISECONDS); previousDay = new Date(bot.multiPeriodProcessDatetime.valueOf() - ONE_DAY_IN_MILISECONDS); - - if (global.WRITE_LOGS_TO_FILES === 'true') { - logger.newInternalLoop(bot.codeName, bot.process, bot.multiPeriodProcessDatetime); - } - + if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] start -> processTimeFramesDailyFiles -> advanceTime -> bot.multiPeriodProcessDatetime = " + bot.multiPeriodProcessDatetime); } if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] start -> processTimeFramesDailyFiles -> advanceTime -> previousDay = " + previousDay); } @@ -1061,6 +1057,7 @@ thisReport.file.lastExecution = bot.processDatetime; thisReport.save(callBack); + logger.newInternalLoop(bot.codeName, bot.process, bot.multiPeriodProcessDatetime); } catch (err) { logger.write(MODULE_NAME, "[ERROR] start -> writeMarketStatusReport -> err = " + err.stack); diff --git a/MultiPeriodDaily.js b/MultiPeriodDaily.js index d80782859..633c7880c 100644 --- a/MultiPeriodDaily.js +++ b/MultiPeriodDaily.js @@ -318,11 +318,7 @@ bot.multiPeriodDailyProcessDatetime = new Date(bot.multiPeriodDailyProcessDatetime.valueOf() + ONE_DAY_IN_MILISECONDS); previousDay = new Date(bot.multiPeriodDailyProcessDatetime.valueOf() - ONE_DAY_IN_MILISECONDS); - - if (global.WRITE_LOGS_TO_FILES === 'true') { - logger.newInternalLoop(bot.codeName, bot.process, bot.multiPeriodDailyProcessDatetime); - } - + if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] start -> processTimeFrames -> advanceTime -> bot.multiPeriodDailyProcessDatetime = " + bot.multiPeriodDailyProcessDatetime); } if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] start -> processTimeFrames -> advanceTime -> previousDay = " + previousDay); } @@ -804,6 +800,8 @@ thisReport.save(callBack); bot.hasTheBotJustStarted = false; + + logger.newInternalLoop(bot.codeName, bot.process, bot.multiPeriodDailyProcessDatetime); } catch (err) { logger.write(MODULE_NAME, "[ERROR] start -> writeStatusReport -> err = "+ err.stack); diff --git a/MultiPeriodMarket.js b/MultiPeriodMarket.js index 9ba755bb1..134c994ca 100644 --- a/MultiPeriodMarket.js +++ b/MultiPeriodMarket.js @@ -338,6 +338,7 @@ thisReport.file.lastExecution = bot.processDatetime; thisReport.save(callBack); + logger.newInternalLoop(bot.codeName, bot.process, bot.processDatetime); } catch (err) { logger.write(MODULE_NAME, "[ERROR] start -> writeStatusReport -> err = "+ err.stack);