Merge pull request #549 from isocolsky/ref/logs
Skip logging of notification requests
This commit is contained in:
commit
61ffe309f8
|
@ -65,9 +65,14 @@ ExpressApp.prototype.start = function(opts, cb) {
|
|||
return req.copayerId
|
||||
});
|
||||
|
||||
|
||||
|
||||
this.app.use(morgan(' :remote-addr :date[iso] ":method :url" :status :res[content-length] :response-time ":user-agent" :walletId :copayerId'));
|
||||
var logFormat = ':remote-addr :date[iso] ":method :url" :status :res[content-length] :response-time ":user-agent" :walletId :copayerId';
|
||||
var logOpts = {
|
||||
skip: function(req, res) {
|
||||
if (res.statusCode != 200) return false;
|
||||
return req.path.indexOf('/notifications/') >= 0;
|
||||
}
|
||||
};
|
||||
this.app.use(morgan(logFormat, logOpts));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue