Skip to content

Tags: go-logr/zapr

Tags

v1.3.0

Toggle v1.3.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request #60 from pohly/slog

support slog

v1.2.4

Toggle v1.2.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request #58 from dongjiang1989/master

[fix]fix security yaml.v3 CVE-2022-28948

v1.2.3

Toggle v1.2.3's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
handle panics in logr.Marshaler.MarshalLog

The function might panic. The conclusion in
go-logr/logr#130 was that the logger should
record that.

zapr only needs to do that when it calls MarshalLog. Strings and errors are
handled by zap.

For the sake of simplicity no attempt is made to detect the reason for the
panic. In case of a panic, the key is replaced by "<key>Error" and the value
with "PANIC=<panic reason>". This is consistent with how zap handles panics.

v1.2.2

Toggle v1.2.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request #50 from thockin/master

Bump to logr v1.2.2

v1.2.0

Toggle v1.2.0's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
support logr.Marshaler

This is useful for objects where zap would prefer to log as string or when
reflection doesn't pick up the desired fields (unexported or too many).

v1.1.0

Toggle v1.1.0's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
numeric verbosity and configurable logger behavior

This is needed to make zapr usable for Kubernetes. Currently
Kubernetes uses a forked zapr with "v" for the numeric verbosity and
"err" for Logger.Error. Handling of invalid calls remains compatible
with zapr v1.0.0 (= panic log messages are emitted, strongly-type Zap
fields are not allowed), but new options allow changing those
defaults.

Those panic messages now log the source code of the caller, not the
zapr.go file where the panic message is logged.

The unit tests were derived from
https://github.com/kubernetes/kubernetes/blob/cff40a7bcc170c473c223081fd0103fd042dc44b/staging/src/k8s.io/component-base/logs/json/json_test.go
and both modified (better error messages, t.Run for each test case)
and extended to enhance coverage.

Several new edge cases are now covered (for example, error logging at
non-zero verbosity levels). New tests for WithName, WithCallDepth and
WithValues were added.

v1.0.0+1

Toggle v1.0.0+1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request #39 from thockin/master

Better docs on negative levels

v1.0.0

Toggle v1.0.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request #28 from thockin/prep-v1

Update zapr to logr v1.0.0-rc1

v0.4.0

Toggle v0.4.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request #21 from thockin/with-call-depth

Add logr.Logger.WithCallDepth() support

v0.3.0

Toggle v0.3.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Merge pull request #17 from thockin/master

Add underlier to get access to zap.Logger