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

update logr to 1.2.4 and fix Stash client #210

Merged
merged 1 commit into from
Apr 20, 2023
Merged

update logr to 1.2.4 and fix Stash client #210

merged 1 commit into from
Apr 20, 2023

Conversation

makkes
Copy link
Member

@makkes makkes commented Apr 19, 2023

In version 1.2.4 of logr a change was introduced that significantly changed the assumptions about logr's API, i.e. that logr.Logger{} != logr.Discard(). This condition doesn't evaluate to true with 1.2.4, anymore, and the default value of the logr.Logger type is now usable as a replacement for logr.Discard().

Therefore we do not need to check if the value has been provided, anymore: If it is not provided, the default one is used which is effectively a discarding logger.

closes #209

In version 1.2.4 a [change](go-logr/logr#166)
was introduced that significantly changed the assumptions about logr's
API, i.e. that `logr.Logger{} != logr.Discard()`. This condition
doesn't evaluate to true with 1.2.4, anymore, and the default value of
the `logr.Logger` type is now usable as a replacement for
`logr.Discard()`.

Therefore we do not need to check if the value has been provided,
anymore: If it is not provided, the default one is used which is
effectively a discarding logger.

closes #209

Signed-off-by: Max Jonas Werner <mail@makk.es>
@makkes makkes requested a review from souleb April 19, 2023 15:32
Copy link
Member

@souleb souleb left a comment

Choose a reason for hiding this comment

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

LGTM! thanks @makkes

@makkes makkes merged commit 620d438 into main Apr 20, 2023
@makkes makkes deleted the upgrade-logr branch April 20, 2023 06:41
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.

Make logger optional in Stash client
2 participants