-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2eca4c
commit 3b8ab40
Showing
9 changed files
with
389 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
|
||
var _requestObfuscator = require('./request-obfuscator'); | ||
|
||
var _request = require('request'); | ||
|
||
var _request2 = _interopRequireDefault(_request); | ||
|
||
var _requestLogger = require('@uphold/request-logger'); | ||
|
||
var _requestLogger2 = _interopRequireDefault(_requestLogger); | ||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
|
||
/** | ||
* Exports. | ||
*/ | ||
|
||
exports.default = logger => (0, _requestLogger2.default)(_request2.default, (request, instance) => { | ||
(0, _requestObfuscator.obfuscate)(request, instance); | ||
|
||
if (request.type === 'response') { | ||
return logger.debug({ request: request }, `Received response for request ${request.id}`); | ||
} | ||
|
||
return logger.debug({ request: request }, `Making request ${request.id} to ${request.method} ${request.uri}`); | ||
}); | ||
/** | ||
* Module dependencies. | ||
*/ | ||
|
||
module.exports = exports['default']; |
Oops, something went wrong.