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

http/fetch: allow configuring a logger on client #706

Merged
merged 1 commit into from
Dec 13, 2023
Merged

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Dec 13, 2023

This allows for the configuration of a logger on the retryable HTTP client. While adding builtin support for providing a logr.Logger instance, which will be wrapped in a retryablehttp.LeveledLogger to only log errors.

Part of: fluxcd/flux2#4472

@hiddeco hiddeco added the area/http HTTP transport related issues and pull requests label Dec 13, 2023
@hiddeco hiddeco requested a review from a team as a code owner December 13, 2023 10:23
http/fetch/go.mod Outdated Show resolved Hide resolved
This allows for the configuration of a logger on the retryable HTTP
client. While adding builtin support for providing a `logr.Logger`
instance, which will be wrapped in  a `retryablehttp.LeveledLogger`
to only log errors.

Signed-off-by: Hidde Beydals <[email protected]>
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hiddeco hiddeco merged commit b446682 into main Dec 13, 2023
13 checks passed
@hiddeco hiddeco deleted the http-fetch-logger branch December 13, 2023 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/http HTTP transport related issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants