Wizcorp / node-graylog2

Graylog2 client library for Node.js
Other
59 stars 36 forks source link

Logging error object fails #46

Open michaelw85 opened 4 years ago

michaelw85 commented 4 years ago
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.

michaelw85 commented 4 years ago

I see this is already fixed & merged (commit 82532a6b1fa0e74a05497cd33921a90eebaa683c) but not released yet. Could this be released @ronkorving 😄

bendavis78 commented 3 years ago

I am also seeing this issue. Any reason this hasn't been released?

mb-realpage commented 1 year ago

+1 from me. A quick glance at the code immediately showed the problem. Is this project looking for a new owner?