Merge pull request #1184 from CartoDB/feature/ch91877/remove-log-aggregation-in-metro
Logger: rename key 'msg' => 'event_message'
This commit is contained in:
commit
f9ad3c8acf
@ -239,7 +239,8 @@ function createTemplateMaps ({ redisPool, surrogateKeysCache, logger }) {
|
|||||||
return logger.error({ exception: err, 'cdb-user': user, template_id: templateName }, 'Named map invalidation failed');
|
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');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ module.exports = function profiler (options) {
|
|||||||
req.profiler.done('response');
|
req.profiler.done('response');
|
||||||
req.profiler.end();
|
req.profiler.end();
|
||||||
const stats = req.profiler.toJSON();
|
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 {
|
try {
|
||||||
// May throw due to dns, see: http://github.com/CartoDB/Windshaft/issues/166
|
// May throw due to dns, see: http://github.com/CartoDB/Windshaft/issues/166
|
||||||
|
@ -24,7 +24,7 @@ module.exports = class Logger {
|
|||||||
return { levelname: label };
|
return { levelname: label };
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
messageKey: 'message',
|
messageKey: 'event_message',
|
||||||
timestamp: () => `,"timestamp":"${new Date(Date.now()).toISOString()}"`,
|
timestamp: () => `,"timestamp":"${new Date(Date.now()).toISOString()}"`,
|
||||||
serializers: {
|
serializers: {
|
||||||
client_request: requestSerializer,
|
client_request: requestSerializer,
|
||||||
|
Loading…
Reference in New Issue
Block a user