Skip to content

MongoDB Sender loses information in provided context #30

Description

@arggh

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" : {

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions