From a4ae36427760c21dae8ebfb4a44834e19461482f Mon Sep 17 00:00:00 2001 From: Gajus Kuizinas Date: Fri, 26 Apr 2019 08:08:52 +0100 Subject: [PATCH] feat: augment logging --- src/classes/Agent.js | 2 +- src/routines/bootstrap.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/classes/Agent.js b/src/classes/Agent.js index 99bc290f..585598bd 100644 --- a/src/classes/Agent.js +++ b/src/classes/Agent.js @@ -40,7 +40,7 @@ class Agent { if (this.mustUrlUseProxy(requestUrl)) { const proxy = this.getUrlProxy(requestUrl); - log.trace('proxying request to %s', requestUrl); + log.trace('proxying request to %s use %s proxy', requestUrl, 'http://' + proxy.hostname + ':' + proxy.port); request.shouldKeepAlive = false; diff --git a/src/routines/bootstrap.js b/src/routines/bootstrap.js index 85b09fa4..f9913bc0 100644 --- a/src/routines/bootstrap.js +++ b/src/routines/bootstrap.js @@ -36,6 +36,10 @@ export default () => { // eslint-disable-next-line no-process-env global.GLOBAL_AGENT.NO_PROXY = process.env.GLOBAL_AGENT_NO_PROXY || null; + log.info({ + configuration: global.GLOBAL_AGENT + }, 'global agent has been initialized'); + const mustUrlUseProxy = (url) => { if (!global.GLOBAL_AGENT.HTTP_PROXY) { return false;