bugsnag / bugsnag-node

[DEPRECATED] Please upgrade to our Universal JS notifier "@bugsnag/js" • https://github.com/bugsnag/bugsnag-js
https://www.bugsnag.com/
MIT License
48 stars 55 forks source link

Cawllec/fix shouldnt notify logging #113

Closed Cawllec closed 7 years ago

Cawllec commented 7 years ago

Disables delivery errors in the case that shouldNotify is false, adds configuration option to overwrite this behaviour if necessary

Cawllec commented 7 years ago

Based on discussion with @bengourley I've removed the changes based around the configuration options, and instead ensured that when an error occurs and is correctly not-notified the original error is logged instead of the notification error.

This still leaves the issue with the initial log level however.

bengourley commented 7 years ago

This is better!

Here is how the user's repro repo now behaves:

image

I think it would be good if the error stack got into the log and looked more like how uncaught errors get logged out:

image

appending e.stack to the log message should do the trick?

Cawllec commented 7 years ago

Appended that stack as suggested and removed the Bugsnag: repetition.

I notice that it's logging each issue twice, any idea why?

bengourley commented 7 years ago

LGTM 👍