flashheart
Advanced tools
Comparing version 2.2.1 to 2.3.0
@@ -5,2 +5,3 @@ var _ = require('lodash'); | ||
var Levee = require('levee'); | ||
var debug = require('debug')('flashheart'); | ||
@@ -89,4 +90,8 @@ var package = require('../package'); | ||
Client.prototype._log = function (res) { | ||
var message = util.format(res.request.method, res.request.href, res.statusCode, res.elapsedTime, 'ms'); | ||
debug(message); | ||
if (this.logger) { | ||
this.logger.info(res.request.method, res.request.href, res.statusCode, res.elapsedTime, 'ms'); | ||
this.logger.info(message); | ||
} | ||
@@ -93,0 +98,0 @@ }; |
{ | ||
"name": "flashheart", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"description": "A fully-featured REST client built for ease-of-use and resilience", | ||
@@ -40,3 +40,3 @@ "main": "index.js", | ||
"mocha": "^2.2.5", | ||
"nock": "^7.0.2", | ||
"nock": "^8.0.0", | ||
"sinon": "^1.15.3" | ||
@@ -60,8 +60,9 @@ }, | ||
"dependencies": { | ||
"debug": "^2.2.0", | ||
"levee": "^1.2.0", | ||
"lodash": "^4.2.0", | ||
"request": "^2.67.0", | ||
"retry": "^0.6.1", | ||
"retry": "^0.9.0", | ||
"wreck": "^5.6.0" | ||
} | ||
} |
@@ -5,3 +5,3 @@ # flashheart | ||
[![Build Status](https://travis-ci.org/bbc/flashheart.svg)](https://travis-ci.org/bbc/flashheart) [![Code Climate](https://codeclimate.com/github/bbc/flashheart/badges/gpa.svg)](https://codeclimate.com/github/bbc/flashheart) [![Test Coverage](https://codeclimate.com/github/bbc/flashheart/badges/coverage.svg)](https://codeclimate.com/github/bbc/flashheart/coverage) | ||
[![Build Status](https://travis-ci.org/bbc/flashheart.svg?branch=master)](https://travis-ci.org/bbc/flashheart) [![Code Climate](https://codeclimate.com/github/bbc/flashheart/badges/gpa.svg)](https://codeclimate.com/github/bbc/flashheart) [![Test Coverage](https://codeclimate.com/github/bbc/flashheart/badges/coverage.svg)](https://codeclimate.com/github/bbc/flashheart/coverage) | ||
@@ -8,0 +8,0 @@ > A fully-featured Node.js REST client built for ease-of-use and resilience |
@@ -149,3 +149,5 @@ var _ = require('lodash'); | ||
assert.ifError(err); | ||
sinon.assert.calledWith(logger.info, 'GET', url, 200); | ||
sinon.assert.called(logger.info); | ||
var message = logger.info.getCall(0).args[0]; | ||
assert.match(message, /GET http:\/\/www.example.com\/ 200 \d+ ms/); | ||
done(); | ||
@@ -152,0 +154,0 @@ }); |
Sorry, the diff of this file is not supported yet
268217
1468
6
+ Addeddebug@^2.2.0
+ Addeddebug@2.6.9(transitive)
+ Addedms@2.0.0(transitive)
+ Addedretry@0.9.0(transitive)
- Removedretry@0.6.1(transitive)
Updatedretry@^0.9.0