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

Improve error logging by adding the error to the log. #21

Merged

Conversation

KeesCBakker
Copy link

Summary

Hubot uses the pino logger. Errors can be logged directly to the logger by robot.logger.error(err, msg). More info here: https://betterstack.com/community/guides/logging/how-to-install-setup-and-use-pino-to-log-node-js-applications/#logging-errors-with-pino

I've added the error objects to the logger so we can view the error details. This will fix #20 .

I've ran the tests and they succeed:

image

Requirements (place an x in each [ ])

@joeyguerra
Copy link
Member

joeyguerra commented Aug 3, 2023

This is awesome! Thank you for taking time to contribute the change. I didn't know how to use Pino. I know a little more now.

FYI, this repo is utilizing semantic release to create releases on smerging to main based on the comments. I'm going to try and add "fix: Improve error logging by adding the error to the log." to the title to see if it'll kick off a release.

@joeyguerra joeyguerra merged commit 2c99805 into hubot-friends:main Aug 3, 2023
3 checks passed
@github-actions
Copy link

github-actions bot commented Aug 3, 2023

🎉 This PR is included in version 1.0.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Errors are not properly logged so information is lost
2 participants