Skip to content

Commit

Permalink
feat: improve log message
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Apr 26, 2019
1 parent 0c83983 commit 87bbba6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/classes/Agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ class Agent {

const proxy = this.getUrlProxy(requestUrl);

log.trace('proxying request to %s using %s proxy', requestUrl, 'http://' + proxy.hostname + ':' + proxy.port);
log.trace({
destination: requestUrl,
proxy: 'http://' + proxy.hostname + ':' + proxy.port
}, 'proxying request');

request.shouldKeepAlive = false;

Expand All @@ -64,6 +67,10 @@ class Agent {
}
});
} else {
log.trace({
destination: requestUrl
}, 'not proxying request; request URL matches NO_PROXY');

// $FlowFixMe It appears that Flow is missing the method description.
this.fallbackAgent.addRequest(request, configuration);
}
Expand Down

0 comments on commit 87bbba6

Please sign in to comment.