Skip to content

Commit e20d0e2

Browse files
committed
turn off logging
1 parent 72ff194 commit e20d0e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ var XHR = XMLHttpRequest
1616
if (!XHR) throw new Error('missing XMLHttpRequest')
1717

1818
module.exports = request
19-
request.log = getLogger()
19+
request.log = {
20+
'trace': noop, 'debug': noop, 'info': noop, 'warn': noop, 'error': noop
21+
}
2022

2123
var DEFAULT_TIMEOUT = 3 * 60 * 1000 // 3 minutes
2224

@@ -41,6 +43,8 @@ function request(options, callback) {
4143

4244
options.onResponse = options_onResponse // And put it back.
4345

46+
if (options.verbose) request.log = getLogger();
47+
4448
if(options.url) {
4549
options.uri = options.url;
4650
delete options.url;

0 commit comments

Comments
 (0)