Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Hook into $log.error #3

Open
AdriVanHoudt opened this issue Dec 3, 2016 · 6 comments
Open

Hook into $log.error #3

AdriVanHoudt opened this issue Dec 3, 2016 · 6 comments

Comments

@AdriVanHoudt
Copy link

This is a feature request for the opbeat logger to hook into $log.error to easily log custom errors

@hmdhk
Copy link
Contributor

hmdhk commented Dec 6, 2016

@AdriVanHoudt ,

Thank you! I will make sure to bring it up in our next planning session.

Have a good one,
Hamid

@AdriVanHoudt
Copy link
Author

would you be open for a PR?

@hmdhk
Copy link
Contributor

hmdhk commented Dec 6, 2016

Absolutely! Feedback and Contribution is much appreciated :)

@AdriVanHoudt
Copy link
Author

Cool, now to find time 🕐 :D

@AdriVanHoudt
Copy link
Author

it seems like opbeat is doing something if I $log.error but not sending to the intake...
image

@AdriVanHoudt
Copy link
Author

my temp workaround until I have more time to make a pr

var errorLog = $log.error;

        $log.error = function () {

            var args = [].slice.call(arguments);

            $opbeat.captureException(args[0]);

            return errorLog.apply(null, args);
        };

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants