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

refactor: use log/slog #39

Merged
merged 3 commits into from
Sep 25, 2024
Merged

refactor: use log/slog #39

merged 3 commits into from
Sep 25, 2024

Conversation

knqyf263
Copy link
Collaborator

A logger for HTTP requests is currently not set.

client.Logger = nil

If we set log.Logger, all debug messages are also displayed, and it's overwhelming.
https://github.com/hashicorp/go-retryablehttp/blob/40b0cad1633fd521cee5884724fcf03d039aaf3f/client.go#L663

It's better to use a leveled logger, and I chose log/slog. Also, this PR replaces all log with log/slog.

Signed-off-by: knqyf263 <[email protected]>
Signed-off-by: knqyf263 <[email protected]>
Signed-off-by: knqyf263 <[email protected]>
@knqyf263
Copy link
Collaborator Author

@DmitriyLewen I'll merge this PR as it's refactoring, but please let me know if you have comments. I'll reflect them later.

@knqyf263 knqyf263 merged commit 6fd091a into main Sep 25, 2024
3 of 4 checks passed
@knqyf263 knqyf263 deleted the slog branch September 25, 2024 19:35
@DmitriyLewen
Copy link
Collaborator

@knqyf263 LGTM

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