Metro: stop aggregating log per request id, use new config.json file

This commit is contained in:
Daniel García Aubert
2020-07-20 19:33:33 +02:00
parent afd4ad500f
commit b32a073ac3
9 changed files with 252 additions and 211 deletions
-1
View File
@@ -9,7 +9,6 @@ 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();
};
+1 -1
View File
@@ -21,7 +21,7 @@ module.exports = function profiler (options) {
res.on('finish', () => {
req.profiler.done('response');
req.profiler.end();
logger.info({ stats: req.profiler.toJSON() });
logger.info({ user: res.locals.user, stats: req.profiler.toJSON() });
try {
// May throw due to dns, see: http://github.com/CartoDB/Windshaft/issues/166