Commit c98ae8750d9bd145dc0cfb1951e378d5c387c4ac

Authored by Adhidarma Hadiwinoto
1 parent 038a3f3ea6
Exists in master and in 1 other branch dev

Processing time log

Showing 2 changed files with 3 additions and 1 deletions Side-by-side Diff

lib/listener-partner/middlewares/common.js
... ... @@ -10,6 +10,8 @@ module.exports = function common(req, res, next) {
10 10 }
11 11  
12 12 res.locals.xid = uniqid();
  13 + res.locals.x_http_request_ts = new Date();
  14 +
13 15 logger.info('Got request from partner', {
14 16 xid: res.locals.xid,
15 17 ip: req.ip,
lib/listener-partner/routers/trx-status.js
... ... @@ -105,7 +105,7 @@ async function pageIndex(req, res) {
105 105  
106 106 res.json(result);
107 107  
108   - logger.verbose('Partner request responded', { xid: res.locals.xid, result });
  108 + logger.verbose('Partner request responded', { xid: res.locals.xid, processing_time_in_ms: new Date() - res.locals.x_http_request_ts, result });
109 109 }
110 110  
111 111 router.get('/', pageIndex);