Skip to content

Logging error object fails #46

Description

@michaelw85
TypeError: Cannot read property 'split' of undefined
    at graylog.log [as _log] (/Users/.....node_modules/graylog2/graylog.js:146:34)
    at graylog.error (/Users/.....node_modules/graylog2/graylog.js:93:17)

Graylog code:

    } else if (short_message.stack && short_message.message) {

        // Short message is an Error message, we process accordingly
        message.short_message = short_message.message;
        message.full_message  = short_message.stack;

        // extract error file and line
        fileinfo = message.stack.split('\n')[0];

Looking at this, the last line message.stack should be short_message.stack.
Message is a newly build object within the library which does not contain a stack trace by default.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions