From 02c8e28494c337d57a488e8b3d5d9cf4d0e743bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Fri, 5 Jun 2020 20:08:40 +0200 Subject: [PATCH] Finalize request's log --- lib/api/middlewares/logger.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/api/middlewares/logger.js b/lib/api/middlewares/logger.js index 09b92ef0..c081c8ea 100644 --- a/lib/api/middlewares/logger.js +++ b/lib/api/middlewares/logger.js @@ -9,6 +9,7 @@ module.exports = function initLogger ({ logger }) { res.locals.logger.info({ request: req }); res.on('finish', () => res.locals.logger.info({ response: res })); + res.on('close', () => res.locals.logger.info({ end: true })); next(); };