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

Replace ErrorReporter with a structured logging interface. #537

Merged
merged 2 commits into from
Jul 3, 2023

Conversation

zenhack
Copy link
Contributor

@zenhack zenhack commented Jun 30, 2023

The new interface:

  • Has levels (debug, info, warn, error)
  • Accepts arguments for structured logging

Per the comments, the interface is designed to be used with *slog.Logger, though other implementations are possible (and we already use one in test).

The new interface:

- Has levels (debug, info, warn, error)
- Accepts arguments for structured logging

Per the comments, the interface is designed to be used with
*slog.Logger, though other implementations are possible (and we already
use one in test).
@zenhack zenhack requested a review from lthibault June 30, 2023 18:48
@zenhack
Copy link
Contributor Author

zenhack commented Jun 30, 2023

Note that there's some followup refactoring to do, such as getting rid of the use of ReportError() internally, and perhaps actually using the lower logging levels for non-fatal events.

@zenhack zenhack merged commit e4708d0 into capnproto:main Jul 3, 2023
0 of 4 checks passed
@zenhack zenhack deleted the logger-interface branch July 3, 2023 11:27
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