Skip to content

Commit

Permalink
feat: augment logging
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Apr 26, 2019
1 parent 62f7091 commit a4ae364
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/classes/Agent.js
Expand Up @@ -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;

Expand Down
4 changes: 4 additions & 0 deletions src/routines/bootstrap.js
Expand Up @@ -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;
Expand Down

0 comments on commit a4ae364

Please sign in to comment.