Merge pull request #1184 from CartoDB/feature/ch91877/remove-log-aggregation-in-metro

Logger: rename key 'msg' => 'event_message'
This commit is contained in:
Daniel G. Aubert 2020-07-23 14:12:17 +02:00 committed by GitHub
commit f9ad3c8acf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -239,7 +239,8 @@ function createTemplateMaps ({ redisPool, surrogateKeysCache, logger }) {
return logger.error({ exception: err, 'cdb-user': user, template_id: templateName }, 'Named map invalidation failed');
}
logger.info({ 'cdb-user': user, template_id: templateName, duration: (Date.now() - startTime) / 1000 }, 'Named map invalidation success');
const elapsed = Date.now() - startTime;
logger.info({ 'cdb-user': user, template_id: templateName, duration: elapsed / 1000, duration_ms: elapsed }, 'Named map invalidation success');
});
}

View File

@ -22,7 +22,7 @@ module.exports = function profiler (options) {
req.profiler.done('response');
req.profiler.end();
const stats = req.profiler.toJSON();
logger.info({ stats, duration: stats.response / 1000 }, 'Request profiling stats');
logger.info({ stats, duration: stats.response / 1000, duration_ms: stats.response }, 'Request profiling stats');
try {
// May throw due to dns, see: http://github.com/CartoDB/Windshaft/issues/166

View File

@ -24,7 +24,7 @@ module.exports = class Logger {
return { levelname: label };
}
},
messageKey: 'message',
messageKey: 'event_message',
timestamp: () => `,"timestamp":"${new Date(Date.now()).toISOString()}"`,
serializers: {
client_request: requestSerializer,