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

feat: add log/slog for logging #379

Closed
4 tasks
muhlemmer opened this issue Apr 22, 2023 · 1 comment · Fixed by #432
Closed
4 tasks

feat: add log/slog for logging #379

muhlemmer opened this issue Apr 22, 2023 · 1 comment · Fixed by #432
Assignees
Labels
backend enhancement New feature or request

Comments

@muhlemmer
Copy link
Collaborator

muhlemmer commented Apr 22, 2023

As a package user I want to be able to log errors and (debug) information. x/exp/slog provides a new standard logging API for Go. From go 1.21 it is already available from the standard library. However, we will use the experimental version first, so that we can still build for 1.20.

Original proposal.

Acceptance criteria:

  • op: attach the logger to the request context in a middleware
  • op: log errors in the error handlers, with logger from context.
  • rp: log errors in the error handlers, with logger from context.
  • provide examples on how to configure the logger.

The purpose of this issue is to set-up a logger framework for at least the most critical code paths and errors and is mostly related to #291. Later more logging points can be introduced where needed for debug or information.

@muhlemmer muhlemmer added enhancement New feature or request backend labels Apr 22, 2023
@muhlemmer muhlemmer self-assigned this Aug 17, 2023
@muhlemmer muhlemmer changed the title feat: add go-logr/logr feat: add log/logs for logging Aug 24, 2023
@muhlemmer muhlemmer changed the title feat: add log/logs for logging feat: add log/slog for logging Aug 24, 2023
@muhlemmer muhlemmer linked a pull request Aug 28, 2023 that will close this issue
@livio-a
Copy link
Member

livio-a commented Aug 29, 2023

was implemented with #432

@livio-a livio-a closed this as completed Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants