Finalize request's log
This commit is contained in:
parent
d28744a5e3
commit
02c8e28494
@ -9,6 +9,7 @@ module.exports = function initLogger ({ logger }) {
|
|||||||
|
|
||||||
res.locals.logger.info({ request: req });
|
res.locals.logger.info({ request: req });
|
||||||
res.on('finish', () => res.locals.logger.info({ response: res }));
|
res.on('finish', () => res.locals.logger.info({ response: res }));
|
||||||
|
res.on('close', () => res.locals.logger.info({ end: true }));
|
||||||
|
|
||||||
next();
|
next();
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user