MongoDB sender seems to be losing information on the logged error on the way to the database.
How to reproduce
// /server/index.js
try {
throw new Error('Oops!');
} catch (e) {
logger.error('Oops!', { error: e });
}
If we have enabled a console logger, the output would be:
W20170108-15:30:08.526(2)? (STDERR) Error Error happened { error: [Error: Oops!],
W20170108-15:30:08.527(2)? (STDERR) meteor:
W20170108-15:30:08.527(2)? (STDERR) { platform: 'server',
.
.
.
but in the MongoDB, the created document for this error would look like this:
{
"_id" : "zfrwTgNoFnNtBZ6tr",
"level" : 3,
"message" : "Error happened",
"context" : {
"error" : {}, <--- missing!
"meteor" : {
MongoDB sender seems to be losing information on the logged error on the way to the database.
How to reproduce
If we have enabled a console logger, the output would be:
but in the MongoDB, the created document for this error would look like this:
{ "_id" : "zfrwTgNoFnNtBZ6tr", "level" : 3, "message" : "Error happened", "context" : { "error" : {}, <--- missing! "meteor" : {