Skip to content

Commit 9efee98

Browse files
committed
https-proxy-agent: use "debug" module
1 parent b8f14f2 commit 9efee98

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

https-proxy-agent.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ var tls = require('tls');
88
var url = require('url');
99
var Agent = require('agent-base');
1010
var inherits = require('util').inherits;
11+
var debug = require('debug')('https-proxy-agent');
1112

1213
/**
1314
* Module exports.
@@ -26,6 +27,8 @@ function HttpsProxyAgent (opts) {
2627
if (!(this instanceof HttpsProxyAgent)) return new HttpsProxyAgent(opts);
2728
if ('string' == typeof opts) opts = url.parse(opts);
2829
if (!opts) throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!');
30+
debug('creating new HttpsProxyAgent instance: %j', opts);
31+
2932
Agent.call(this);
3033

3134
var proxy = clone(opts, {});

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"url": "https://github.com/TooTallNate/node-https-proxy-agent/issues"
2323
},
2424
"dependencies": {
25-
"agent-base": "~0.0.1"
25+
"agent-base": "~0.0.1",
26+
"debug": "~0.7.2"
2627
},
2728
"devDependencies": {
2829
"mocha": "~1.12.0"

0 commit comments

Comments
 (0)