skip log for notification requests
This commit is contained in:
parent
7e3660adf5
commit
0403b5ab94
|
@ -65,9 +65,14 @@ ExpressApp.prototype.start = function(opts, cb) {
|
||||||
return req.copayerId
|
return req.copayerId
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var logFormat = ':remote-addr :date[iso] ":method :url" :status :res[content-length] :response-time ":user-agent" :walletId :copayerId';
|
||||||
|
var logOpts = {
|
||||||
this.app.use(morgan(' :remote-addr :date[iso] ":method :url" :status :res[content-length] :response-time ":user-agent" :walletId :copayerId'));
|
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