From ea190f67542945ae9f9987bddff36220f2896102 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 6 Jun 2018 16:28:23 +0200 Subject: [PATCH] Logging functionality re-written, all modules affected --- Trading-Process/User.Bot.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Trading-Process/User.Bot.js b/Trading-Process/User.Bot.js index 3d879488b..d5011bf72 100644 --- a/Trading-Process/User.Bot.js +++ b/Trading-Process/User.Bot.js @@ -1,16 +1,10 @@ -exports.newUserBot = function newUserBot(BOT, DEBUG_MODULE) { +exports.newUserBot = function newUserBot(bot, logger) { const FULL_LOG = true; - let bot = BOT; - - const MODULE_NAME = 'UserBot'; + const MODULE_NAME = 'User Bot'; const LOG_INFO = true; - const logger = DEBUG_MODULE.newDebugLog(); - logger.fileName = MODULE_NAME; - logger.bot = bot; - let thisObject = { initialize: initialize, start: start @@ -58,7 +52,7 @@ if (global.AT_BREAKPOINT === true) { - if (FULL_LOG === true) { logger.write("[INFO] run -> loop -> Plot Breakpoint Hit."); } + if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] run -> loop -> Plot Breakpoint Hit."); } }