Skip to content
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

Confused About logger.error API #336

Closed
arb opened this issue Jul 12, 2017 · 1 comment
Closed

Confused About logger.error API #336

arb opened this issue Jul 12, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@arb
Copy link

arb commented Jul 12, 2017

Per the documentation, you can pass into rollbar.error an exception, a string, and an object. What I'd like to do is pass an exception and a string that's a simple human readable label. However, it seems like if I pass an exception into rollbar.error, the string is ignored and only the exception information is logged. I can pass an object in with meta data and get around this, but that seems counter to the documentation.

I'm currently trying with logger.error(result, 'error retrieving databases'); where results is an instance of Error.

@arb arb changed the title Confused About Basic Example Confused About logger.error API Jul 12, 2017
@rokob
Copy link
Contributor

rokob commented Jul 12, 2017

Yeah this is a bug in expectations, and needs to get changed. The expected result of

logger.error(result, 'error retrieving databases');

should be that we get the stack trace for the result error, but the message string should probably be added either to the description of the error or as part of the custom metadata. Right now it is just thrown away.

@rokob rokob self-assigned this Jul 12, 2017
@rokob rokob added the bug label Jul 12, 2017
@rokob rokob added this to the v2.1.1 milestone Jul 12, 2017
@rokob rokob closed this as completed in 40decd0 Jul 14, 2017
mudetroit pushed a commit that referenced this issue Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants