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

logging: slight improvement to observer logging #407

Merged
merged 2 commits into from
Sep 14, 2022

Conversation

willfindlay
Copy link
Contributor

Log errors from event handlers and use structured logging for opcode errors.

We were previously silently ignoring error messages in an our event handlers. It's
probably better if we log them here instead. Ideally we shouldn't have any errors in our
event handlers so I think a level of Warn is fine for now. If it gets to spammy in
practice we can drop it to Debug at some point.

Signed-off-by: William Findlay <[email protected]>
Switch unknown opcode message to use structured logging and log the event type as a string
(if we know it) in addition to the opcode. Finally, switch the log level to warning rather
than info, which is more semantically correct here in my opinion.

Signed-off-by: William Findlay <[email protected]>
@willfindlay willfindlay requested a review from a team as a code owner September 14, 2022 18:58
@michi-covalent michi-covalent merged commit c2a3d19 into main Sep 14, 2022
@michi-covalent michi-covalent deleted the pr/willfindlay/extra-debug-info branch September 14, 2022 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants