Skip to content

Commit

Permalink
Merge pull request #5 from joaquimserafim/v4
Browse files Browse the repository at this point in the history
v4
  • Loading branch information
joaquimserafim authored Mar 21, 2017
2 parents 9255655 + 41856c4 commit 05cc96c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ request
"hostname": "local",
"pid": 54073,
"origin": "superagent", // LOG ORIGIN
"id": "ix6btz2q--wyq997", // REQUEST ID
"req_id": "ix6btz2q--wyq997", // REQUEST ID
"level": 30,
"req": { // REQUEST
"method": "GET",
Expand All @@ -72,7 +72,7 @@ request
"hostname": "local",
"pid": 54073,
"origin": "superagent",// LOG ORIGIN
"id": "ix6btz2q--wyq997", // REQUEST ID
"req_id": "ix6btz2q--wyq997", // REQUEST ID
"level": 30,
"res": { // RESPONSE STATUS AND PAYLOAD
"statusCode": 200,
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function logger (bunyan, requestId) {
const log = bunyan.child(
{
origin: 'superagent',
id: req.id,
req_id: req.id,
serializers: {
err: bunyan.constructor.stdSerializers.err,
req: reqSerializer,
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "superagent-bunyan",
"version": "3.0.1",
"version": "4.0.0",
"description": "a plugin for superagent that uses bunyan to log the request s and responses",
"main": "index.js",
"files": [
Expand Down Expand Up @@ -29,15 +29,15 @@
},
"homepage": "https://github.com/joaquimserafim/superagent-bunyan#readme",
"devDependencies": {
"bunyan": "^1.8.5",
"bunyan": "^1.8.9",
"chai": "^3.5.0",
"express": "^4.14.1",
"fn-spy": "^2.0.0",
"istanbul": "0.4.5",
"mocha": "^3.2.0",
"pre-commit": "^1.2.2",
"standard": "^8.6.0",
"superagent": "^3.4.1"
"superagent": "^3.5.1"
},
"dependencies": {
"get-property-value": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ function testLogRecords (records, runExtraExpections) {
function each (record, index) {
// default values for both entries
expect(record.name).to.be.equal('superagent-bunyan')
expect(record.id).to.exist
expect(record.req_id).to.exist
expect(record.hostname).to.exist
expect(record.pid).to.be.a('number')
expect(record.level).to.be.a('number')
Expand Down

0 comments on commit 05cc96c

Please sign in to comment.