bunyan-request-logger
Advanced tools
Comparing version 0.2.1 to 0.2.2
{ | ||
"name": "bunyan-request-logger", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Automated request logging connect middleware for Express. Powered by Bunyan.", | ||
@@ -5,0 +5,0 @@ "main": "request-logger.js", |
@@ -153,10 +153,11 @@ 'use strict'; | ||
next) { | ||
status = err.status || res && res.status; | ||
// Add the requestId so we can link the | ||
// error back to the originating request. | ||
err.requestId = req.requestId; | ||
err.requestId = req && req.requestId; | ||
// Omit stack from the 4xx range | ||
if (err.status >= 400 && | ||
err.status <=499 ) { | ||
if (status >= 400 && | ||
status <=499) { | ||
delete err.stack; | ||
@@ -163,0 +164,0 @@ } |
10954
263