-
Notifications
You must be signed in to change notification settings - Fork 1
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 module github.com/go-logr/logr to v1 #16
base: main
Are you sure you want to change the base?
Conversation
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Reviewer's Guide by SourceryThis PR updates the go-logr/logr dependency from v0.4.0 to v1.4.2. This is a major version upgrade that introduces significant improvements in logging functionality, particularly around slog interoperability and various bug fixes. No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have skipped reviewing this pull request. It seems to have been created by a bot (hey, renovate[bot]!). We assume it knows what it's doing!
This PR contains the following updates:
v0.4.0
->v1.4.2
Release Notes
go-logr/logr (github.com/go-logr/logr)
v1.4.2
Compare Source
What's Changed
Dependencies:
Full Changelog: go-logr/logr@v1.4.1...v1.4.2
v1.4.1
Compare Source
What's Changed
Full Changelog: go-logr/logr@v1.4.0...v1.4.1
v1.4.0
Compare Source
This release dramatically improves interoperability with Go's
log/slog
package. In particular,logr.NewContext
andlogr.NewContextWithSlogLogger
use the same context key, which allowslogr.FromContext
andlogr.FromContextAsSlogLogger
to returnlogr.Logger
or*slog.Logger
respectively, including transparently converting each to the other as needed.Functions
logr/slogr.NewLogr
andlogr/slogr.ToSlogHandler
have been superceded bylogr.FromSlogHandler
andlogr.ToSlogHandler
respectively, and typelogr/slogr.SlogSink
has been superceded bylogr.SlogSink
. All of the old names inlogr/slogr
remain, for compatibility.Package
logr/funcr
now supportslogr.SlogSink
, meaning that it's output passes all but one of the Slog conformance tests (that exception being thatfuncr
handles the timestamp itself).Users who have a
logr.Logger
and need a*slog.Logger
can callslog.New(logr.ToSlogHandler(...))
and all output will go through the same stack.Users who have a
*slog.Logger
orslog.Handler
can calllogr.FromSlogHandler(...)
and all output will go through the same stack.What's Changed
New Contributors
Full Changelog: go-logr/logr@v1.3.0...v1.4.0
v1.3.0
Compare Source
This release adds support for slog in a new, self-contained
logr/slogr
package. Implementers of alogr.LogSink
are encouraged, but not required, to extend their implementation to improve the quality of log output coming from aslog
API call.Breaking change: the call depth for
LogSink.Enabled
when called viaLogger.Enabled
was fixed to be the same as for other call paths. Implementers of aLogSink
who have worked around this bug will need to remove their workarounds.Security best practices were improved. Only Go versions >= 1.18 are supported by this release.
What's Changed
New Contributors
Full Changelog: go-logr/logr@v1.2.4...v1.3.0
v1.2.4
Compare Source
This is a collection of small bugfixes and documentation updates.
NOTE: A change (https://github.com/go-logr/logr/pull/166) which was thought to be compatible seems to be a breaking change. In particular, one used to be able to differentiate the result of
Discard()
fromLogger{}
. After this change, those are the same. We are considering how to address this, but do not currently plan to revert this change. Apologies!What's Changed
New Contributors
Full Changelog: go-logr/logr@v1.2.3...v1.2.4
v1.2.3
Compare Source
This is a minor release.
What's Changed
New Contributors
Full Changelog: go-logr/logr@v1.2.2...v1.2.3
v1.2.2
Compare Source
Bugfix release
MaxLogDepth
which controls how many levels of nested fields (e.g. a struct that contains a struct that contains a struct, etc.) it may log. Every time it finds a struct, slice, array, or map the depth is increased by one. When the maximum is reached, the value will be converted to a string indicating that the max depth has been exceeded. If this field is not specified, a default value will be used.v1.2.1
Compare Source
This is a minor bugfix release.
Error()
semantics. 1) Error messages are always printed (they do not followV()
) and theerror
argument may be nil.RenderValuesHook
func would save the "cooked" result, so repeated calls toWithValues()
would not merge properly.v1.2.0
Compare Source
This release has several bug fixes and feature improvements.
logr.Marshaler
interface for types which want to control how they get loggedfmt.Stringer
anderror
interfaces on values which implement themjson
struct tags (all except "string")json
packageencoding.TextMarshaler
for map keysgo doc
enhancementsv1.1.0
Compare Source
This release has several bugfixes and feature improvements.
WithCallDepth()
calls.GetSink()
andSetSink()
for customWithSomething(logr, something)
integrations.CallStackHelperLogSink
interface so that implementations which have a function to flag helper functions (e.g.testing.T
hasHelper()
) can attribute callers correctly. Log helper functions should prefer to useWithCallStackHelper()
insteadWithCallDepth(1)
for maximum reach. Note the signature ofWithCallStackHelper()
- the caller must ALSO call the returned function.LogTimestamp
option.funcr.Formatter
in other logger implementations. Used intesting.NewTestLogger()
NewTestLogger()
LogTimestamp
andVerbosity
inNewTestLoggerWithOptions()
v1.0.0
Compare Source
This is the first logged release. Major changes (including breaking changes)
have occurred since earlier tags.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.