From 8bfe11a902b0669738e9659f101781cd42929c7c Mon Sep 17 00:00:00 2001 From: Matias Date: Fri, 15 Feb 2019 10:37:59 -0300 Subject: [PATCH] Removing logger logs for now --- Integrations/OperationsModuleIntegration.js | 11 +++-------- utils/auth.js | 4 ---- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/Integrations/OperationsModuleIntegration.js b/Integrations/OperationsModuleIntegration.js index b8de71616..efdb623ac 100644 --- a/Integrations/OperationsModuleIntegration.js +++ b/Integrations/OperationsModuleIntegration.js @@ -1,13 +1,10 @@ const axios = require('axios') const appRoot = require('app-root-path') -const { logger } = require(`${appRoot}/utils/logger`) const auth = require(`${appRoot}/utils/auth`) exports.updateExecutionResults = async function (summaryDate, buyAverage, sellAverage, marketRate, combinedProfitsA, combinedProfitsB) { - logger.debug('updateExecutionResults -> Entering Function.') - try { const accessToken = await auth.authenticate() @@ -50,12 +47,10 @@ exports.updateExecutionResults = async function (summaryDate, buyAverage, sellAv } }) - if (!operationsResponse.data.errors) - logger.debug('updateExecutionResults -> Operations Module Response: %s', operationsResponse.data.data.operations_UpdateExecutionSummary) - else throw new Error(operationsResponse.data.errors[0].message) + if (operationsResponse.data.errors) + throw new Error(operationsResponse.data.errors[0].message) } catch (error) { - logger.error('updateExecutionResults -> Error: ' + error.stack) - throw new Error('There has been an error updating the execution report: ' + error) + throw new Error('There has been an error updating the execution on the clone: ' + error) } } \ No newline at end of file diff --git a/utils/auth.js b/utils/auth.js index c7f0b8d87..be0145a1f 100644 --- a/utils/auth.js +++ b/utils/auth.js @@ -1,12 +1,9 @@ const axios = require('axios') -const appRoot = require('app-root-path') -const { logger } = require(`${appRoot}/utils/logger`) exports.authenticate = async function () { try { if (!global.ACCESS_TOKEN) { - logger.debug('authenticate -> Entering Function.') const authBody = '{"client_id":"' + process.env.AUTH_CLIENT_ID + '","client_secret": "' + process.env.AUTH_CLIENT_SECRET @@ -33,7 +30,6 @@ exports.authenticate = async function () { return global.ACCESS_TOKEN } catch (error) { - logger.error('authenticate -> Error: ' + error.stack) throw new Error('There has been an error on the authentication: ' + error) } } \ No newline at end of file