-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why does the logger not report :error messages? #30
Comments
Hey Joakim, This logger is built on top of Erlang's error_logger rather than Elixir's Logger so it handles the Erlang error eventsinstead (see the list at the bottom of the page I linked to above). If you're explicitly calling Honeybadger.notify(exception, context, stacktrace) |
That might be fine for an application, but toniq is a general purpose background job library. Don't want that to know about any specific error handling service. |
I'll try experimenting with using |
The problem with Elixir's Logger is its default translator turns everything into a String. This causes you to lose all sorts of great information such as the process dictionary. Background processing is actually the very reason I chose to use Erlang's error_logger rather than Elixir's Logger. With |
I'll look into using another way to report errors in toniq. In general I think I'd like the honeybadger client to err on the side of caution and report all error types possible, even if that means missing out of some contextual information. If my app is not working as expected, I want to know about it! :) |
The way you know about your app failing is by letting processes crash and letting the BEAM do what it does best.
|
I agree with you, I should let it crash. I'm just afraid not every piece of code ever written in Elixir will follow that pattern, and just ignoring other errors on principle seems like it could cause problems. Thanks for a great library and good feedback btw! |
Thank you for the discussion! I'll think about this but I think the Elixir Logger will have to change before we can accommodate it. If it were easy to have both error_logger and Logger and not duplicate messages I would do that but at this point error_logger is more robust.
|
Hello!
I've been trying to move over to this client from my own honeybadger client that pre-dates this one.
It seems to work good except this client does not handle
:error
-level log messages. Is this by design somehow or does it make sense to add it?https://github.com/honeybadger-io/honeybadger-elixir/blob/master/lib/honeybadger/logger.ex seems to only handle
:error_report
.I've so far relied on this in my job queue library for error reporting but that means those errors don't turn up in honeybadger when using this client. The errors are reported here:
https://github.com/joakimk/toniq/blob/296b99346b86bad8a1380ccbab1b79f61bd412ec/lib/toniq/job_runner.ex#L47
The text was updated successfully, but these errors were encountered: