bunyan-pilgrim
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -5,2 +5,3 @@ 'use strict'; | ||
var fs = require('fs'); | ||
var sprintf = require('sprintf'); | ||
var util = require('util'); | ||
@@ -59,7 +60,12 @@ | ||
if (this.timingOnly) { | ||
this.stream.write(JSON.stringify({ | ||
transaction: entry.req_id, | ||
statusCode: entry.res.statusCode, | ||
timers: entry.req.timers | ||
})); | ||
var timers = entry.req.timers | ||
var time = Object.keys(timers).reduce(function(val, key) { return val + timers[key]; }, 0); | ||
var result = sprintf( | ||
'%3s %-80s %015d', | ||
entry.req.method, | ||
entry.req.url.substring(0, 80), | ||
time); | ||
this.stream.write(result); | ||
} else { | ||
@@ -66,0 +72,0 @@ this.stream.write(record); |
{ | ||
"name": "bunyan-pilgrim", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A REST-oriented logger for Bunyan", | ||
@@ -35,3 +35,6 @@ "main": "lib/index.js", | ||
"tmp": "0.0.23" | ||
}, | ||
"dependencies": { | ||
"sprintf": "^0.1.3" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12941
266
1
+ Addedsprintf@^0.1.3
+ Addedsprintf@0.1.5(transitive)