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

contextual logging #296

Merged
merged 4 commits into from
Mar 15, 2022
Merged

contextual logging #296

merged 4 commits into from
Mar 15, 2022

Conversation

pohly
Copy link

@pohly pohly commented Feb 16, 2022

What this PR does / why we need it:

Contextual logging enables several new use cases as shown in https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/3077-contextual-logging.

This PR is an implementation of the logging side of the revised KEP (currently pending in review). A PR with the logcheck changes will be filed separately.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Related-to: kubernetes/enhancements#3077

Special notes for your reviewer:

We probably should merge the KEP change first.

This PR is best looked at commit-by-commit.

Release note:

Additional API calls for [contextual logging](https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/3077-contextual-logging).

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 16, 2022
contextual.go Outdated
// SetLogger sets a Logger implementation that will be used in two different
// ways:
// - as backing implementation of the traditional klog log calls
// - for direct log calls afer retrieving it with FromContext, TODO, or
Copy link
Author

Choose a reason for hiding this comment

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

I need to call out one thing here: this requirement that direct log calls are also okay is new. Some loggers that were installed with SetLogger for use as backend might not work as expected because they don't check verbosity.

For example, the original JSON logger from component-base/logs didn't check verbosity and instead relied entirely on klog to do that for it. If called directly, all log entries would have gotten emitted.

Given that SetLogger is still relatively new, I feel that this change of semantics is acceptable. But if we want to be absolutely sure about not breaking anyone, we can also do this instead:

  • keep SetLogger as it is (i.e. loggers will only be called as backend)
  • add a new SetContextualLogger (same semantic as described here)
  • both functions set globalLogger, but also a boolean
  • Background returns klogr (i.e. logging goes through klog) when SetLogger was used, otherwise the logger

Copy link
Author

Choose a reason for hiding this comment

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

@serathius pointed out that SetLogger actually predates structured logging and was used already earlier to redirect Kubernetes output into other loggers.

A code search indeed finds users who rely on verbosity filtering in klog:

Let's play it safe and use SetContextualLogger.

klogr.go Outdated Show resolved Hide resolved
@dims
Copy link
Member

dims commented Mar 2, 2022

/assign @thockin @serathius

// logger may also get called directly by code that retrieves it
// with FromContext, TODO or Background. The logger therefore must
// implements its own verbosity checking.
func SetContextualLogger(logger logr.Logger) {

Choose a reason for hiding this comment

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

Why have two different way to switch contextualLogger on? I think that having one switch like EnableContextualLogging is enough. Having two ways makes creates inconsistency and needless discussion on which option should be used.

Copy link
Author

Choose a reason for hiding this comment

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

It's just a feeling, but replacing klog.SetContextualLogger(logger) with

klog.SetLogger(logger)
klog.EnableContextualLogging(true)

doesn't send a clear message to me that logger must meet certain criteria for this to work.

Also, EnableContextualLogging as it is defined right now is about something else and cannot be used to enable the additional usage of the logger.

It's on by default and controls the behavior of calls like FromContext. It's meaning is not "the logger can be used as contextual logger". We would need a separate klog.UseLoggerAsContextualLogger call for that - or something like that. I can't think of a good name and prefer to keep SetContextualLogger.

Choose a reason for hiding this comment

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

It's just a feeling, but replacing klog.SetContextualLogger(logger) with

klog.SetLogger(logger)
klog.EnableContextualLogging(true)

doesn't send a clear message to me that logger must meet certain criteria for this to work.

If I remember this criteria, it was that provided logger needs to execute verbosity checks for itself. Right? I think the logr interface already expects that. I don't think we should be guided by rushed implementation for K8s json logging that skipped this.

Just want to make sure we don't bring old baggage to the API.

Copy link
Author

Choose a reason for hiding this comment

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

If I remember this criteria, it was that provided logger needs to execute verbosity checks for itself. Right?

Correct.

I don't think we should be guided by rushed implementation for K8s json logging that skipped this.

We can't be sure that other implementations didn't do the same. Searching for it with https://grep.app/search?q=klog.SetLogger finds several places that'll get broken if we change the requirements for the logger passed to SetLogger:

Copy link
Author

Choose a reason for hiding this comment

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

I think the logr interface already expects that.

The interface only expects that there is an Enabled function. It does not specify a specific semantic like "compare against your verbosity threshold", therefore an implementation that always returns true is valid. klog did specify a semantic ("verbosity check done by klog, logger should always log what it gets") and we shouldn't change that for SetLogger.

Copy link
Member

Choose a reason for hiding this comment

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

hmm. i keep forgetting that. how about the LogSink? roughly

func SetLogger(logger logr.Logger) {
    // call logger.GetSink() and do the
    // interface/method check here
}

func AddSupportsContext(logger logr.Logger) logr.Logger {
     sink := logger.GetSink()
     return logger.WithSink(wrapper{logger})
}

type wrapper struct {
   logr.LogSink
}

func (w wrapper) SupportsContext() bool {
    return true
}

// usage:

klog.SetLogger(klog.AddSupportsContext(logger))

Copy link
Author

Choose a reason for hiding this comment

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

That works. See additional commit for the result.

I find it rather ugly and it's also fragile (wrapping doesn't survive a logger.WithValues, for example), but it gets the job done. I can live with this.

Copy link
Author

Choose a reason for hiding this comment

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

As I noticed while working on this, wrapping like this is dropping the hidden logr.Logger.level field. To me this looks more and more like a hack.

Copy link
Author

Choose a reason for hiding this comment

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

  • Make SetContextualLogger an experimental/temporary function that will be removed.
  • Identify and file issue to github projects that didn't implement proper verbosity checking.
  • Remove SetContextualLogger when all the cases are fixed.

That means whoever wants two use contextual logging and directly call the logger must migrate twice: first to SetContextualLogger because SetLogger will not do what they want, then back to SetLogger once we have changed it. That doesn't sound appealling.

Another alternative is:

  • introduce SetContextualLogger as experimental (state of this PR before removing it)
  • when we consider it stable, remove the "experimental" tag
  • at the same time or later, mark SetLogger as deprecated
  • remove it when it no longer seems to be used

I don't know whether we can do that within the klog/v2. I'm also not sure whether "clean API" is worth all the trouble for the community.

Yet another alternative: adding optional functional parameters to SetLogger, without adding SetContextualLogger. The only parameter will be ContextualLogger(enabled bool). This is an API break in theory (function signature changes, so code which uses it for a function pointer breaks), but in practice the only usage seem to be direct calls and those continue to work without changes.

Copy link
Author

Choose a reason for hiding this comment

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

Another alternative is: [...] remove SetLogger when it no longer seems to be used

This implies that downstream users must change their code although it currently works fine for them. If they are happy with the current approach (klog flags + verbosity checks, Logger without verbosity check as backend), why should they change? Do we gain that much from the removal that it is worth breaking working code? I don't think so.

helpers.go Outdated Show resolved Hide resolved
}
}

// Verbosity overrides the default verbosity level of 5.
Copy link

@serathius serathius Mar 3, 2022

Choose a reason for hiding this comment

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

When we changed the default? I thought it was 0, or I misunderstand something?
Why have different default for testing?

Copy link
Author

Choose a reason for hiding this comment

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

Only the testing logger has a higher verbosity. klog still has 0.

The rationale is explained in the next sentence: at that level we get messages that will be useful to understand a failed test.

Copy link
Author

Choose a reason for hiding this comment

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

I've extended the explanations in the comment.

Choose a reason for hiding this comment

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

I understand the motivation, I'm not sure if this is new, have been discussed before or we are just adding in this PR because we can.

I don't think that increasing default verbosity is not a simple enough change that we can do it here. For example without understanding the impact of log volume on test infrastructure. I'm also not sure that a dependency should decide on changing the default logging verbosity for testing of k/k repo.

Copy link
Author

Choose a reason for hiding this comment

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

I think there is a misunderstanding. This klog/ktesting Logger is not changing anything in existing tests. Only unit tests that get converted as explained in the KEP and in the example in this repo are going to use it.

Unmodified tests will continue to log through the global klog logger, with the same verbosity as before.

Copy link
Author

Choose a reason for hiding this comment

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

@pohly
Copy link
Author

pohly commented Mar 8, 2022

/hold

Let's conclude the API discussion here, then update and merge the KEP first (kubernetes/enhancements#3222) before this one.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 8, 2022
This logr implementation can be used in tests to ensure that output
is associated with the currently running test. Compared to using the
global klog instance in a standard Go test that has some advantages:
- Log messages are associated with the currently running test.
  Tests can run in parallel without interleaving their output.
- Log output is only printed when a test fails, unless "go test -v"
  is used.
- Because of that, the logger can print more log messages by default,
  with 5 being used because that is recommended for debugging in
  https://github.com/kubernetes/community/blob/fbc5ca53d6bfd8388b335f7d0198b67a14b99d91/contributors/devel/sig-instrumentation/logging.md?plain=1#L34-L36
  That threshold can be changed via -testing.v after registering
  that flag by importing k8s.io/klog/v2/ktesting/init.

The motivation for hosting this logger in klog is that it shares the formatting
code with klogr. Conceptually this is identical to go-logr/logr/testing, just
the output is different (klog text format vs. JSON).

  $ go test -v ./testinglogger/example/
  === RUN   TestKlog
      example_test.go:69: INFO hello world
      example_test.go:70: ERROR failed err="failed: some error"
      example_test.go:71: INFO verbosity 1
      example_test.go:72: INFO main/helper: with prefix
      example_test.go:73: INFO key/value pairs int=1 float=2 pair="(1, 2)" kobj="kube-system/sally"
  --- PASS: TestKlog (0.00s)

The corresponding output from go-logr/logr/testing would be:

  === RUN   TestLogr
      example_test.go:69: "ts"="2021-09-07 16:44:54.307551" "level"=0 "msg"="hello world"
      example_test.go:70: "ts"="2021-09-07 16:44:54.307664" "msg"="failed" "error"="failed: some error"
      example_test.go:71: "ts"="2021-09-07 16:44:54.307686" "level"=1 "msg"="verbosity 1"
      example_test.go:72: main/helper: "ts"="2021-09-07 16:44:54.307703" "level"=0 "msg"="with prefix"
      example_test.go:73: "ts"="2021-09-07 16:44:54.307733" "level"=0 "msg"="key/value pairs" "int"=1 "float"=2 "pair"={} "kobj"={"name":"sally","namespace":"kube-system"}
  --- PASS: TestLogr (0.00s)
The goal is to have only "legacy" code in klog.go.
As discussed in kubernetes/enhancements#3078, enabling
code that only imports klog for all logging makes life simpler for developers.

This was also the reason why KObj was added to klog instead of a separate
helper package.
)

func init() {
ktesting.DefaultConfig.AddFlags(flag.CommandLine)

Choose a reason for hiding this comment

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

I'm not sure about registering testing flags in init. Have we talked with SIG testing about what is the best way to integrate logging into test framework?

Copy link
Author

Choose a reason for hiding this comment

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

This is a Golang problem, not a SIG Testing problem. I asked Tim and he suggested to ask on golang-nuts. I did that but got no responses.

Copy link
Author

Choose a reason for hiding this comment

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

I've also asked on SIG Testing, just in case that someone there has an opinion: https://kubernetes.slack.com/archives/C09QZ4DQB/p1646918432994899

pohly added a commit to pohly/klog that referenced this pull request Mar 10, 2022
We can avoid the variant of SetLogger by indicating support via an additional
interface that the LogSink must implement. This was seen as a cleaner
approach (kubernetes#296 (comment)).
pohly added a commit to pohly/klog that referenced this pull request Mar 10, 2022
We can avoid the variant of SetLogger by indicating support via an additional
interface that the LogSink must implement. This was seen as a cleaner
approach (kubernetes#296 (comment)).
contextual.go Outdated
// application code. Only the LogSink seen by SetLogger needs to implement
// this, clones of it as they occur during logger.V, logger.WithName or
// logger.WithValues don't need it.
type ContextualLogSink interface {
Copy link
Member

Choose a reason for hiding this comment

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

Do we need this to be public?

Copy link
Author

Choose a reason for hiding this comment

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

Only if we expect some LogSinks to implement it directly. They'll need it for compile-time checks that they implement the interface.

I'm fine with saying that only wrapping is supported.

Copy link
Author

Choose a reason for hiding this comment

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

I've pushed an update which doesn't have such an interface at all anymore.

equal := logger == klog.Background()
fmt.Printf("original logr.Discard logger can be used directly: %v\n", equal)

logger = klog.AddSupportsContext(logger)
Copy link
Member

Choose a reason for hiding this comment

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

instead of this:

	logger = klog.AddSupportsContext(logger)
	klog.SetLogger(logger)

could we do this?:

klog.SetLogger(klog.WithContextLogging(logger))

Copy link
Author

Choose a reason for hiding this comment

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

I then need to change how the result of klog.Background is checked. It's doable.

contextual.go Outdated
// AddSupportsContext wraps a logger that doesn't know about ContextualLogSink
// so that SetLogger knows that it can also be called directly.
func AddSupportsContext(logger logr.Logger) logr.Logger {
return logr.New(contextualLogSinkWrapper{logger.GetSink()})
Copy link
Author

@pohly pohly Mar 10, 2022

Choose a reason for hiding this comment

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

This is slightly broken: we loose the level field.

If someone does SetLogger(AddSupportsContext(logger.V(1))), then what we do instead is SetLogger(AddSupportedContext(logger)).

I can see a way around that, but it's going to be very ugly.

Copy link
Author

Choose a reason for hiding this comment

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

No, my idea doesn't work. I wanted to call logger.Enabled and then see how LogSink.Enabled is called (it gets a level), but it's not possible to intercept that call.

@pohly pohly force-pushed the contextual-logging branch 2 times, most recently from f4b4499 to 4dc1bbf Compare March 10, 2022 17:07
@dims
Copy link
Member

dims commented Mar 11, 2022

@pohly after sleeping on it, i am ok with adding SetContextualLogger one question i had was

  • should SetLogger be deprecated
  • if we do deprecate and remove SetLogger, how would people get the functionality they do with SetLogger? Should we add an additional parameter to SetContextualLogger?

thanks!

@pohly
Copy link
Author

pohly commented Mar 11, 2022

should SetLogger be deprecated

It serves a particular purpose (use Logger as backend, and only as backend) which is a valid use case. If we deprecate it, then we need a replacement. I don't see a need for deprecating it, but don't feel strongly about it.

if we do deprecate and remove SetLogger, how would people get the functionality they do with SetLogger? Should we add an additional parameter to SetContextualLogger?

If we do that, then I prefer a different name. Currently the name implies a certain semantic, it would be odd to use it when that semantic is not desired.

The alternative is SetLoggerWithOptions(logger logr.Logger, opts ...klog.LoggerOptions), i.e. functional parameters, with an option ContextualLogger(enabled bool). It could be off by default, then SetLoggerWithOptions(logger) will be a direct replacement for a deprecated SetLogger.

@dims
Copy link
Member

dims commented Mar 11, 2022

The alternative is SetLoggerWithOptions(logger logr.Logger, opts ...klog.LoggerOptions), i.e. functional parameters, with an option ContextualLogger(enabled bool). It could be off by default, then SetLoggerWithOptions(logger) will be a direct replacement for a deprecated SetLogger.

So ... i really like this approach! +1 from me.

@pohly
Copy link
Author

pohly commented Mar 11, 2022

I also like SetLoggerWithOptions best. Implemented.

@dims
Copy link
Member

dims commented Mar 11, 2022

Squash please @pohly

//
// Notice: This function is EXPERIMENTAL and may be changed or removed in a
// later release.
func EnableContextualLogging(enabled bool) {
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need this?

Copy link
Author

Choose a reason for hiding this comment

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

It was an explicit request during the KEP review that Kubernetes must have a feature gate for the new functionality. This call here is needed for that feature gate.

The effect is IMHO minimal, but we still need it to comply with the Kubernetes policies.

@dims
Copy link
Member

dims commented Mar 11, 2022

@thockin we worked through a bunch of things here, Can you please review now?

This moves the global logger into a separate file together with the functions
that implement contextual logging.

The advantage of SetLoggerWithOptions over alternatives like a
SetContextualLogger without options is that it can be used as a drop-in
replacement for SetLogger. This allows us to deprecate SetLogger. Whether we
actually do that is kept open for now.
@pohly
Copy link
Author

pohly commented Mar 11, 2022

I squashed into stand-alone commits where each of them makes sense by itself.

I also update the corresponding KEP to match the API that we agreed upon here: kubernetes/enhancements#3222

@thockin if you agree with this PR, can you also review that KEP update?

@thockin
Copy link
Member

thockin commented Mar 14, 2022

KEP approved. I didn't read this code too deeply because I lack context on it, but it seems roughly the right shape and form.

@dims
Copy link
Member

dims commented Mar 14, 2022

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 14, 2022
@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, pohly

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 14, 2022
@pohly
Copy link
Author

pohly commented Mar 15, 2022

/hold cancel

KEP pending approval, but that's just a matter of getting the right okays now.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 15, 2022
@k8s-ci-robot k8s-ci-robot merged commit 6631b8c into kubernetes:main Mar 15, 2022
TylerHelmuth referenced this pull request in open-telemetry/opentelemetry-collector-contrib Dec 19, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [k8s.io/klog](https://github.com/kubernetes/klog) | require | major
| `v1.0.0` -> `v2.110.1` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>kubernetes/klog (k8s.io/klog)</summary>

###
[`v2.110.1`](https://github.com/kubernetes/klog/releases/tag/v2.110.1):
Prepare klog release for Kubernetes v1.29 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.100.1...v2.110.1)

#### What's Changed

- fix: SetLogger via klog.SetLogger will output an unexpected newline by
[@&#8203;aimuz](https://github.com/aimuz) in
[https://github.com/kubernetes/klog/pull/378](https://github.com/kubernetes/klog/pull/378)
- resolve comments warning by
[@&#8203;lowang-bh](https://github.com/lowang-bh) in
[https://github.com/kubernetes/klog/pull/379](https://github.com/kubernetes/klog/pull/379)
- stderrthreshold: fix flag comment by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/376](https://github.com/kubernetes/klog/pull/376)
- enable "go vet" checks for parameters by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/390](https://github.com/kubernetes/klog/pull/390)
- promote experimental code to stable by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/392](https://github.com/kubernetes/klog/pull/392)
- golangci-lint action by [@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/380](https://github.com/kubernetes/klog/pull/380)
- output: handle WithName like zapr does by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/391](https://github.com/kubernetes/klog/pull/391)
- slog support + logr 1.3.0 update by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/384](https://github.com/kubernetes/klog/pull/384)

#### New Contributors

- [@&#8203;aimuz](https://github.com/aimuz) made their first
contribution in
[https://github.com/kubernetes/klog/pull/378](https://github.com/kubernetes/klog/pull/378)
- [@&#8203;lowang-bh](https://github.com/lowang-bh) made their first
contribution in
[https://github.com/kubernetes/klog/pull/379](https://github.com/kubernetes/klog/pull/379)

**Full Changelog**:
kubernetes/klog@v2.100.1...v2.110.1

###
[`v2.100.1`](https://github.com/kubernetes/klog/releases/tag/v2.100.1):
Prepare klog release for Kubernetes v1.28 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.90.1...v2.100.1)

#### What's Changed

- expose logBridge via NewStandardLog() by
[@&#8203;mikedanese](https://github.com/mikedanese) in
[https://github.com/kubernetes/klog/pull/369](https://github.com/kubernetes/klog/pull/369)
- add Format wrapper by [@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/374](https://github.com/kubernetes/klog/pull/374)
- JSON as fallback encoding by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/375](https://github.com/kubernetes/klog/pull/375)

#### New Contributors

- [@&#8203;mikedanese](https://github.com/mikedanese) made their first
contribution in
[https://github.com/kubernetes/klog/pull/369](https://github.com/kubernetes/klog/pull/369)

**Full Changelog**:
kubernetes/klog@v2.90.1...v2.100.1

###
[`v2.90.1`](https://github.com/kubernetes/klog/releases/tag/v2.90.1):
Prepare klog release for Kubernetes v1.27 (Take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.90.0...v2.90.1)

#### What's Changed

- buffer: restore dropping of too large buffers by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/366](https://github.com/kubernetes/klog/pull/366)
- ktesting improvements by [@&#8203;pohly](https://github.com/pohly)
in
[https://github.com/kubernetes/klog/pull/365](https://github.com/kubernetes/klog/pull/365)
- ktesting + textlogger config api by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/368](https://github.com/kubernetes/klog/pull/368)
- textlogger write through by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/363](https://github.com/kubernetes/klog/pull/363)

**Full Changelog**:
kubernetes/klog@v2.90.0...v2.90.1

###
[`v2.90.0`](https://github.com/kubernetes/klog/releases/tag/v2.90.0):
Prepare klog release for Kubernetes v1.27 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.80.1...v2.90.0)

#### What's Changed

- klog: benchmark the overhead when logging is off by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/355](https://github.com/kubernetes/klog/pull/355)
- improve textlogger by [@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/362](https://github.com/kubernetes/klog/pull/362)

**Full Changelog**:
kubernetes/klog@v2.80.1...v2.90.0

##### There are some API differences from previous version

    k8s.io/klog/v2/klogr contains incompatible changes:
     - klogger.Enabled: removed
     - klogger.Error: removed
     - klogger.Info: removed

    k8s.io/klog/v2/test contains incompatible changes:
     - InitKlog: changed from func() to func(testing.TB) *flag.FlagSet

###
[`v2.80.1`](https://github.com/kubernetes/klog/releases/tag/v2.80.1):
Prepare klog release for Kubernetes v1.26 (Take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.80.0...v2.80.1)

#### What's Changed

- InitFlags concurrency fix by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/349](https://github.com/kubernetes/klog/pull/349)

**Full Changelog**:
kubernetes/klog@v2.80.0...v2.80.1

###
[`v2.80.0`](https://github.com/kubernetes/klog/releases/tag/v2.80.0):
Prepare klog release for Kubernetes v1.26 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.70.1...v2.80.0)

#### What's Changed

- OWNERS: add harshanarayana by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/342](https://github.com/kubernetes/klog/pull/342)
- kvlistformat: fix the issue with display marshalled value for non
string type by
[@&#8203;harshanarayana](https://github.com/harshanarayana) in
[https://github.com/kubernetes/klog/pull/344](https://github.com/kubernetes/klog/pull/344)
- Bump version of golang to 1.19 and drop older versions by
[@&#8203;dims](https://github.com/dims) in
[https://github.com/kubernetes/klog/pull/345](https://github.com/kubernetes/klog/pull/345)

**Full Changelog**:
kubernetes/klog@v2.70.1...v2.80.0

###
[`v2.70.1`](https://github.com/kubernetes/klog/releases/tag/v2.70.1):
Prepare klog release for Kubernetes v1.25 (Take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.70.0...v2.70.1)

#### What's Changed

- ktesting: handle test completion by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/337](https://github.com/kubernetes/klog/pull/337)
- contextual logging: enable by default again by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/341](https://github.com/kubernetes/klog/pull/341)

**Full Changelog**:
kubernetes/klog@v2.70.0...v2.70.1

###
[`v2.70.0`](https://github.com/kubernetes/klog/releases/tag/v2.70.0):
Prepare klog release for Kubernetes v1.25 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.60.1...v2.70.0)

#### What's Changed

- logcheck: contextual logging + enhanced checks by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/297](https://github.com/kubernetes/klog/pull/297)
- hack/tools: drop dependency on golangci-lint by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/313](https://github.com/kubernetes/klog/pull/313)
- StopFlushDaemon: document flushing on shutdown by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/314](https://github.com/kubernetes/klog/pull/314)
- logcheck: fix detection of invalid \* regexp in filter by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/315](https://github.com/kubernetes/klog/pull/315)
- README.md: clarify -logtostderr by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/319](https://github.com/kubernetes/klog/pull/319)
- Trim duplicates by [@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/324](https://github.com/kubernetes/klog/pull/324)
- replace KObjs with KObjSlice by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/322](https://github.com/kubernetes/klog/pull/322)
- support logr.Marshaler by [@&#8203;pohly](https://github.com/pohly)
in
[https://github.com/kubernetes/klog/pull/325](https://github.com/kubernetes/klog/pull/325)
- internal: remove unused TrimDuplicates by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/326](https://github.com/kubernetes/klog/pull/326)
- save and restore state by [@&#8203;pohly](https://github.com/pohly)
in
[https://github.com/kubernetes/klog/pull/320](https://github.com/kubernetes/klog/pull/320)
- GitHub: use apidiff with more recent Go by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/329](https://github.com/kubernetes/klog/pull/329)
- remove hack/tools by [@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/330](https://github.com/kubernetes/klog/pull/330)
- GIT-331: fix shadowing key from the kv pair by
[@&#8203;harshanarayana](https://github.com/harshanarayana) in
[https://github.com/kubernetes/klog/pull/332](https://github.com/kubernetes/klog/pull/332)
- klog.Fatal backtrace revert by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/328](https://github.com/kubernetes/klog/pull/328)
- ktesting: capture log data in memory by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/327](https://github.com/kubernetes/klog/pull/327)
- GIT-275: add tests for int and struct keys by
[@&#8203;harshanarayana](https://github.com/harshanarayana) in
[https://github.com/kubernetes/klog/pull/333](https://github.com/kubernetes/klog/pull/333)

#### New Contributors

- [@&#8203;harshanarayana](https://github.com/harshanarayana) made
their first contribution in
[https://github.com/kubernetes/klog/pull/332](https://github.com/kubernetes/klog/pull/332)

**Full Changelog**:
kubernetes/klog@v2.60.1...v2.70.0

###
[`v2.60.1`](https://github.com/kubernetes/klog/releases/tag/v2.60.1):
Prepare klog release for Kubernetes v1.24 (Take 6)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.60.0...v2.60.1)

#### What's Changed

- Cleanup OWNERS file by
[@&#8203;serathius](https://github.com/serathius) in
[https://github.com/kubernetes/klog/pull/309](https://github.com/kubernetes/klog/pull/309)
- dependencies: avoid k8s.io/utils, fork clock code instead by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/310](https://github.com/kubernetes/klog/pull/310)
- promote contextual logging APIs to stable by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/311](https://github.com/kubernetes/klog/pull/311)

**Full Changelog**:
kubernetes/klog@v2.60.0...v2.60.1

###
[`v2.60.0`](https://github.com/kubernetes/klog/releases/tag/v2.60.0):
Prepare klog release for Kubernetes v1.24 (Take 5)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.50.2...v2.60.0)

#### What's Changed

- SetContextualLogger: remove unintentionally merged API call by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/308](https://github.com/kubernetes/klog/pull/308)

**Full Changelog**:
kubernetes/klog@v2.50.2...v2.60.0

###
[`v2.50.2`](https://github.com/kubernetes/klog/compare/v2.50.1...v2.50.2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.50.1...v2.50.2)

###
[`v2.50.1`](https://github.com/kubernetes/klog/releases/tag/v2.50.1):
Prepare klog release for Kubernetes v1.24 (Take 4)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.50.0...v2.50.1)

#### What's Changed

- SetLoggerWithOptions: support flushing by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/306](https://github.com/kubernetes/klog/pull/306)

**Full Changelog**:
kubernetes/klog@v2.50.0...v2.50.1

###
[`v2.50.0`](https://github.com/kubernetes/klog/releases/tag/v2.50.0):
Prepare klog release for Kubernetes v1.24 (Take 3)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.40.1...v2.50.0)

#### What's Changed

- Panic on empty info with custom logr by
[@&#8203;jklaw90](https://github.com/jklaw90) in
[https://github.com/kubernetes/klog/pull/283](https://github.com/kubernetes/klog/pull/283)
- Add missing Depth logging functions. by
[@&#8203;s3rj1k](https://github.com/s3rj1k) in
[https://github.com/kubernetes/klog/pull/280](https://github.com/kubernetes/klog/pull/280)
- fix typo in klog.go by
[@&#8203;cocaccola](https://github.com/cocaccola) in
[https://github.com/kubernetes/klog/pull/270](https://github.com/kubernetes/klog/pull/270)
- Update README.md by
[@&#8203;noaabarki](https://github.com/noaabarki) in
[https://github.com/kubernetes/klog/pull/281](https://github.com/kubernetes/klog/pull/281)
- log filter: ignored by V, used during log call by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/290](https://github.com/kubernetes/klog/pull/290)
- SetLogger/ClearLogger/SetLogFilter cleanup by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/289](https://github.com/kubernetes/klog/pull/289)
- fixes for PR
[#&#8203;280](https://github.com/kubernetes/klog/issues/280),
refactoring, textlogger, unit test by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/287](https://github.com/kubernetes/klog/pull/287)
- klogr verbosity by [@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/295](https://github.com/kubernetes/klog/pull/295)
- test: fix Go version matrix by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/298](https://github.com/kubernetes/klog/pull/298)
- handle panics in MarshalLog, Error, String by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/299](https://github.com/kubernetes/klog/pull/299)
- Fix goroutine leak: make flushDaemon stoppable by
[@&#8203;katexochen](https://github.com/katexochen) in
[https://github.com/kubernetes/klog/pull/293](https://github.com/kubernetes/klog/pull/293)
- structured logging: replacing Fatal/Exit/etc. without loss of flushing
by [@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/303](https://github.com/kubernetes/klog/pull/303)
- contextual logging by [@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/296](https://github.com/kubernetes/klog/pull/296)
- remove side effects of tests by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/305](https://github.com/kubernetes/klog/pull/305)
- tests: stop testing with Go 1.14 by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/304](https://github.com/kubernetes/klog/pull/304)

#### New Contributors

- [@&#8203;jklaw90](https://github.com/jklaw90) made their first
contribution in
[https://github.com/kubernetes/klog/pull/283](https://github.com/kubernetes/klog/pull/283)
- [@&#8203;s3rj1k](https://github.com/s3rj1k) made their first
contribution in
[https://github.com/kubernetes/klog/pull/280](https://github.com/kubernetes/klog/pull/280)
- [@&#8203;cocaccola](https://github.com/cocaccola) made their first
contribution in
[https://github.com/kubernetes/klog/pull/270](https://github.com/kubernetes/klog/pull/270)
- [@&#8203;noaabarki](https://github.com/noaabarki) made their first
contribution in
[https://github.com/kubernetes/klog/pull/281](https://github.com/kubernetes/klog/pull/281)
- [@&#8203;katexochen](https://github.com/katexochen) made their first
contribution in
[https://github.com/kubernetes/klog/pull/293](https://github.com/kubernetes/klog/pull/293)

**Full Changelog**:
kubernetes/klog@v2.40.1...v2.50.0

###
[`v2.40.1`](https://github.com/kubernetes/klog/releases/tag/v2.40.1):
Prepare klog release for Kubernetes v1.24 (Take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.40.0...v2.40.1)

#### What's Changed

- Using OS targeted go files to separate out the username logic. by
[@&#8203;phillipsj](https://github.com/phillipsj) in
[https://github.com/kubernetes/klog/pull/271](https://github.com/kubernetes/klog/pull/271)
- Recover from nil pointers when logging by
[@&#8203;dims](https://github.com/dims) in
[https://github.com/kubernetes/klog/pull/279](https://github.com/kubernetes/klog/pull/279)

#### New Contributors

- [@&#8203;phillipsj](https://github.com/phillipsj) made their first
contribution in
[https://github.com/kubernetes/klog/pull/271](https://github.com/kubernetes/klog/pull/271)

**Full Changelog**:
kubernetes/klog@v2.40.0...v2.40.1

###
[`v2.40.0`](https://github.com/kubernetes/klog/releases/tag/v2.40.0):
Prepare klog release for Kubernetes v1.24

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.30.0...v2.40.0)

#### What's Changed

- structured logging: support values with line breaks by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/273](https://github.com/kubernetes/klog/pull/273)
- Fix klog lock release on panic error by
[@&#8203;astraw99](https://github.com/astraw99) in
[https://github.com/kubernetes/klog/pull/272](https://github.com/kubernetes/klog/pull/272)
- add format test for KObjs by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/276](https://github.com/kubernetes/klog/pull/276)
- add Verbose.InfoSDepth by [@&#8203;pohly](https://github.com/pohly)
in
[https://github.com/kubernetes/klog/pull/277](https://github.com/kubernetes/klog/pull/277)

#### Known Issues

-
[https://github.com/kubernetes/klog/issues/278](https://github.com/kubernetes/klog/issues/278)

#### New Contributors

- [@&#8203;astraw99](https://github.com/astraw99) made their first
contribution in
[https://github.com/kubernetes/klog/pull/272](https://github.com/kubernetes/klog/pull/272)

**Full Changelog**:
kubernetes/klog@v2.30.0...v2.40.0

###
[`v2.30.0`](https://github.com/kubernetes/klog/releases/tag/v2.30.0):
Prepare klog release for Kubernetes v1.23 (take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.20.0...v2.30.0)

#### What's Changed

- Fix logcheck exit function by
[@&#8203;luyou86](https://github.com/luyou86) in
[https://github.com/kubernetes/klog/pull/265](https://github.com/kubernetes/klog/pull/265)
- custom marshaler for ObjectRef by
[@&#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/266](https://github.com/kubernetes/klog/pull/266)

#### New Contributors

- [@&#8203;luyou86](https://github.com/luyou86) made their first
contribution in
[https://github.com/kubernetes/klog/pull/265](https://github.com/kubernetes/klog/pull/265)

**Full Changelog**:
kubernetes/klog@v2.20.0...v2.30.0

###
[`v2.20.0`](https://github.com/kubernetes/klog/releases/tag/v2.20.0):
Prepare klog release for Kubernetes v1.23

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.10.0...v2.20.0)

Changes are here :
kubernetes/klog@v2.10.0...v2.20.0

since we moved to logr v1.0.0, there are incompatible changes:

    - klogger.Enabled: changed from func() bool to func(int) bool
- klogger.Info: changed from func(string, ...interface{}) to func(int,
string, ...interface{})
    - klogger.V: removed
- klogger.WithCallDepth: changed from func(int)
github.com/go-logr/logr.Logger to func(int)
github.com/go-logr/logr.LogSink
- klogger.WithName: changed from func(string)
github.com/go-logr/logr.Logger to func(string)
github.com/go-logr/logr.LogSink
- klogger.WithValues: changed from func(...interface{})
github.com/go-logr/logr.Logger to func(...interface{})
github.com/go-logr/logr.LogSink

[`83653a6`](https://github.com/kubernetes/klog/commit/83653a6deebf)
Update to newest versions of golang 1.17.x
[`d648c2e`](https://github.com/kubernetes/klog/commit/d648c2e42d30)
fix file-based filtering symbolization
[`8ee3d65`](https://github.com/kubernetes/klog/commit/8ee3d652c96b)
export ClearLogger
[`4171f3c`](https://github.com/kubernetes/klog/commit/4171f3c1be1b)
Switching to logr tag v1.0.0
[`9ab3c2b`](https://github.com/kubernetes/klog/commit/9ab3c2b56cb2)
add serathius as approvers of klog

###
[`v2.10.0`](https://github.com/kubernetes/klog/releases/tag/v2.10.0):
One more change to support 1.22 release

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.9.0...v2.10.0)

Changes are here :
kubernetes/klog@v2.9.0...v2.10.0

new function added:

    func KObjs(arg interface{}) []ObjectRef

###
[`v2.9.0`](https://github.com/kubernetes/klog/releases/tag/v2.9.0):
Prepare release for Kubernetes v1.22

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.8.0...v2.9.0)

Changes are here :
kubernetes/klog@v2.8.0...v2.9.0

[`6a9ef3f`](https://github.com/kubernetes/klog/commit/6a9ef3fa9a15)
fix typo
[`59f7cb5`](https://github.com/kubernetes/klog/commit/59f7cb505f58)
fix byte array display in InfoS and ErrorS
[`cf22f1e`](https://github.com/kubernetes/klog/commit/cf22f1e79721)
Call logr with call depth
[`e95c7e3`](https://github.com/kubernetes/klog/commit/e95c7e303755)
make SetLogger thread-safe
[`2728fe1`](https://github.com/kubernetes/klog/commit/2728fe192acc)
check usage of format specifier in structured log func
[`a18bc97`](https://github.com/kubernetes/klog/commit/a18bc976a212)
Fix by pr suggestions
[`4e4135c`](https://github.com/kubernetes/klog/commit/4e4135c3dd8a)
Add check for InfoS & ErrorS parameters

###
[`v2.8.0`](https://github.com/kubernetes/klog/releases/tag/v2.8.0):
Bug fixes for structured logging for Kubernetes v1.21

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.7.0...v2.8.0)

###
[`v2.7.0`](https://github.com/kubernetes/klog/releases/tag/v2.7.0):
Miscellaneous fixes for structured logging for Kubernetes v1.21

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.6.0...v2.7.0)

Changes are here :
kubernetes/klog@v2.6.0...v2.7.0

###
[`v2.6.0`](https://github.com/kubernetes/klog/releases/tag/v2.6.0):
Adding a linter for Kubernetes v1.21

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.5.0...v2.6.0)

Changes are here :
kubernetes/klog@v2.5.0...v2.6.0

please see
https://github.com/kubernetes/klog/tree/master/hack/tools/logcheck

###
[`v2.5.0`](https://github.com/kubernetes/klog/releases/tag/v2.5.0):
Prepare release for Kubernetes v1.21

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.4.0...v2.5.0)

Changes are here :
kubernetes/klog@v2.4.0...v2.5.0

klog.go has new API:

+func ErrorSDepth(depth int, err error, msg string, keysAndValues
...interface{}) {
+func InfoSDepth(depth int, msg string, keysAndValues ...interface{}) {

klogr/klogr.go has new API:

    func (l klogger) WithCallDepth(depth int) logr.Logger {
    func NewWithOptions(options ...Option) logr.Logger {
    func WithFormat(format Format) Option {

###
[`v2.4.0`](https://github.com/kubernetes/klog/releases/tag/v2.4.0):
Prepare release for Kubernetes v1.20

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.3.0...v2.4.0)

Changes are here :
kubernetes/klog@v2.3.0...v2.4.0

###
[`v2.3.0`](https://github.com/kubernetes/klog/releases/tag/v2.3.0):
Fix Typo-ed Method Error -&gt; ErrorS

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.2.0...v2.3.0)

Changes are here :
kubernetes/klog@v2.2.0...v2.3.0

###
[`v2.2.0`](https://github.com/kubernetes/klog/releases/tag/v2.2.0):
Dependency update and bugfix for InfoS

[Compare
Source](https://github.com/kubernetes/klog/compare/2.1.0...v2.2.0)

- [`2e691eb`](https://github.com/kubernetes/klog/commit/2e691eb3eeb3)
Fix missing fields in verbose InfoS
- [`966c986`](https://github.com/kubernetes/klog/commit/966c98681ca0)
feat use go-logr v0.2.0

Changes are here :
kubernetes/klog@v2.1.0...v2.2.0

###
[`v2.1.0`](https://github.com/kubernetes/klog/releases/tag/v2.1.0):
Better support for Structured Logging

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.0.0...2.1.0)

We are now enforcing API compatibility, added Windows based tests, and
have tweaked the structured logging methods after some real world
experience updating kubernetes main repo.

- [`bbd9ca1`](https://github.com/kubernetes/klog/commit/bbd9ca1) Add
tests for error in InfoS
- [`1ccc0e1`](https://github.com/kubernetes/klog/commit/1ccc0e1) fix
imported bug time encode format form kvlistFormat
- [`dd4d1a6`](https://github.com/kubernetes/klog/commit/dd4d1a6) fix
typo in README.md
- [`49123d4`](https://github.com/kubernetes/klog/commit/49123d4)
ErrorS(nil, ...) should call loggr.Error(nil, ...)
- [`5b199cd`](https://github.com/kubernetes/klog/commit/5b199cd) Fix
documentation for V(level)
- [`d1eb30f`](https://github.com/kubernetes/klog/commit/d1eb30f) Add
apidiff script to check go signature changes
- [`dc505bf`](https://github.com/kubernetes/klog/commit/dc505bf)
Switch slack channel to #klog
- [`a47ebb9`](https://github.com/kubernetes/klog/commit/a47ebb9) Add
example for co-existence of klog v1 and v2
- [`134f148`](https://github.com/kubernetes/klog/commit/134f148)
logName(): lazily lookup userName instead of on init()
- [`db06a1b`](https://github.com/kubernetes/klog/commit/db06a1b) fix
serialization of special html chars
- [`5727d2a`](https://github.com/kubernetes/klog/commit/5727d2a) Fix
Windows integration tests
- [`edbc1d3`](https://github.com/kubernetes/klog/commit/edbc1d3)
test(\*): TestRollover failed randomly on Windows
- [`6f99060`](https://github.com/kubernetes/klog/commit/6f99060) Add
LogToStderr, a programatic way to log exclusively to stderr or not

###
[`v2.0.0`](https://github.com/kubernetes/klog/releases/tag/v2.0.0):
Release to support Kubernetes v1.19

[Compare
Source](https://github.com/kubernetes/klog/compare/v1.0.0...v2.0.0)

Beware of type change: `Verbose`

New Methods:

-   `SetLogger` (override logger to set a custom implementation)
-   `InfoS` (structured logging)
-   `ErrorS` (structured logging)

Changes are here :
kubernetes/klog@v2.0.0-rc.1...v2.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), 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.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44Ny4yIiwidXBkYXRlZEluVmVyIjoiMzcuODcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
Co-authored-by: Yang Song <songy23@users.noreply.github.com>
Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
cparkins referenced this pull request in AmadeusITGroup/opentelemetry-collector-contrib Jan 10, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [k8s.io/klog](https://github.com/kubernetes/klog) | require | major
| `v1.0.0` -> `v2.110.1` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>kubernetes/klog (k8s.io/klog)</summary>

###
[`v2.110.1`](https://github.com/kubernetes/klog/releases/tag/v2.110.1):
Prepare klog release for Kubernetes v1.29 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.100.1...v2.110.1)

#### What's Changed

- fix: SetLogger via klog.SetLogger will output an unexpected newline by
[@&open-telemetry#8203;aimuz](https://github.com/aimuz) in
[https://github.com/kubernetes/klog/pull/378](https://github.com/kubernetes/klog/pull/378)
- resolve comments warning by
[@&open-telemetry#8203;lowang-bh](https://github.com/lowang-bh) in
[https://github.com/kubernetes/klog/pull/379](https://github.com/kubernetes/klog/pull/379)
- stderrthreshold: fix flag comment by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/376](https://github.com/kubernetes/klog/pull/376)
- enable "go vet" checks for parameters by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/390](https://github.com/kubernetes/klog/pull/390)
- promote experimental code to stable by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/392](https://github.com/kubernetes/klog/pull/392)
- golangci-lint action by [@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/380](https://github.com/kubernetes/klog/pull/380)
- output: handle WithName like zapr does by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/391](https://github.com/kubernetes/klog/pull/391)
- slog support + logr 1.3.0 update by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/384](https://github.com/kubernetes/klog/pull/384)

#### New Contributors

- [@&open-telemetry#8203;aimuz](https://github.com/aimuz) made their first
contribution in
[https://github.com/kubernetes/klog/pull/378](https://github.com/kubernetes/klog/pull/378)
- [@&open-telemetry#8203;lowang-bh](https://github.com/lowang-bh) made their first
contribution in
[https://github.com/kubernetes/klog/pull/379](https://github.com/kubernetes/klog/pull/379)

**Full Changelog**:
kubernetes/klog@v2.100.1...v2.110.1

###
[`v2.100.1`](https://github.com/kubernetes/klog/releases/tag/v2.100.1):
Prepare klog release for Kubernetes v1.28 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.90.1...v2.100.1)

#### What's Changed

- expose logBridge via NewStandardLog() by
[@&open-telemetry#8203;mikedanese](https://github.com/mikedanese) in
[https://github.com/kubernetes/klog/pull/369](https://github.com/kubernetes/klog/pull/369)
- add Format wrapper by [@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/374](https://github.com/kubernetes/klog/pull/374)
- JSON as fallback encoding by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/375](https://github.com/kubernetes/klog/pull/375)

#### New Contributors

- [@&open-telemetry#8203;mikedanese](https://github.com/mikedanese) made their first
contribution in
[https://github.com/kubernetes/klog/pull/369](https://github.com/kubernetes/klog/pull/369)

**Full Changelog**:
kubernetes/klog@v2.90.1...v2.100.1

###
[`v2.90.1`](https://github.com/kubernetes/klog/releases/tag/v2.90.1):
Prepare klog release for Kubernetes v1.27 (Take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.90.0...v2.90.1)

#### What's Changed

- buffer: restore dropping of too large buffers by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/366](https://github.com/kubernetes/klog/pull/366)
- ktesting improvements by [@&open-telemetry#8203;pohly](https://github.com/pohly)
in
[https://github.com/kubernetes/klog/pull/365](https://github.com/kubernetes/klog/pull/365)
- ktesting + textlogger config api by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/368](https://github.com/kubernetes/klog/pull/368)
- textlogger write through by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/363](https://github.com/kubernetes/klog/pull/363)

**Full Changelog**:
kubernetes/klog@v2.90.0...v2.90.1

###
[`v2.90.0`](https://github.com/kubernetes/klog/releases/tag/v2.90.0):
Prepare klog release for Kubernetes v1.27 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.80.1...v2.90.0)

#### What's Changed

- klog: benchmark the overhead when logging is off by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/355](https://github.com/kubernetes/klog/pull/355)
- improve textlogger by [@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/362](https://github.com/kubernetes/klog/pull/362)

**Full Changelog**:
kubernetes/klog@v2.80.1...v2.90.0

##### There are some API differences from previous version

    k8s.io/klog/v2/klogr contains incompatible changes:
     - klogger.Enabled: removed
     - klogger.Error: removed
     - klogger.Info: removed

    k8s.io/klog/v2/test contains incompatible changes:
     - InitKlog: changed from func() to func(testing.TB) *flag.FlagSet

###
[`v2.80.1`](https://github.com/kubernetes/klog/releases/tag/v2.80.1):
Prepare klog release for Kubernetes v1.26 (Take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.80.0...v2.80.1)

#### What's Changed

- InitFlags concurrency fix by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/349](https://github.com/kubernetes/klog/pull/349)

**Full Changelog**:
kubernetes/klog@v2.80.0...v2.80.1

###
[`v2.80.0`](https://github.com/kubernetes/klog/releases/tag/v2.80.0):
Prepare klog release for Kubernetes v1.26 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.70.1...v2.80.0)

#### What's Changed

- OWNERS: add harshanarayana by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/342](https://github.com/kubernetes/klog/pull/342)
- kvlistformat: fix the issue with display marshalled value for non
string type by
[@&open-telemetry#8203;harshanarayana](https://github.com/harshanarayana) in
[https://github.com/kubernetes/klog/pull/344](https://github.com/kubernetes/klog/pull/344)
- Bump version of golang to 1.19 and drop older versions by
[@&open-telemetry#8203;dims](https://github.com/dims) in
[https://github.com/kubernetes/klog/pull/345](https://github.com/kubernetes/klog/pull/345)

**Full Changelog**:
kubernetes/klog@v2.70.1...v2.80.0

###
[`v2.70.1`](https://github.com/kubernetes/klog/releases/tag/v2.70.1):
Prepare klog release for Kubernetes v1.25 (Take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.70.0...v2.70.1)

#### What's Changed

- ktesting: handle test completion by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/337](https://github.com/kubernetes/klog/pull/337)
- contextual logging: enable by default again by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/341](https://github.com/kubernetes/klog/pull/341)

**Full Changelog**:
kubernetes/klog@v2.70.0...v2.70.1

###
[`v2.70.0`](https://github.com/kubernetes/klog/releases/tag/v2.70.0):
Prepare klog release for Kubernetes v1.25 (Take 1)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.60.1...v2.70.0)

#### What's Changed

- logcheck: contextual logging + enhanced checks by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/297](https://github.com/kubernetes/klog/pull/297)
- hack/tools: drop dependency on golangci-lint by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/313](https://github.com/kubernetes/klog/pull/313)
- StopFlushDaemon: document flushing on shutdown by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/314](https://github.com/kubernetes/klog/pull/314)
- logcheck: fix detection of invalid \* regexp in filter by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/315](https://github.com/kubernetes/klog/pull/315)
- README.md: clarify -logtostderr by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/319](https://github.com/kubernetes/klog/pull/319)
- Trim duplicates by [@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/324](https://github.com/kubernetes/klog/pull/324)
- replace KObjs with KObjSlice by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/322](https://github.com/kubernetes/klog/pull/322)
- support logr.Marshaler by [@&open-telemetry#8203;pohly](https://github.com/pohly)
in
[https://github.com/kubernetes/klog/pull/325](https://github.com/kubernetes/klog/pull/325)
- internal: remove unused TrimDuplicates by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/326](https://github.com/kubernetes/klog/pull/326)
- save and restore state by [@&open-telemetry#8203;pohly](https://github.com/pohly)
in
[https://github.com/kubernetes/klog/pull/320](https://github.com/kubernetes/klog/pull/320)
- GitHub: use apidiff with more recent Go by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/329](https://github.com/kubernetes/klog/pull/329)
- remove hack/tools by [@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/330](https://github.com/kubernetes/klog/pull/330)
- GIT-331: fix shadowing key from the kv pair by
[@&open-telemetry#8203;harshanarayana](https://github.com/harshanarayana) in
[https://github.com/kubernetes/klog/pull/332](https://github.com/kubernetes/klog/pull/332)
- klog.Fatal backtrace revert by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/328](https://github.com/kubernetes/klog/pull/328)
- ktesting: capture log data in memory by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/327](https://github.com/kubernetes/klog/pull/327)
- GIT-275: add tests for int and struct keys by
[@&open-telemetry#8203;harshanarayana](https://github.com/harshanarayana) in
[https://github.com/kubernetes/klog/pull/333](https://github.com/kubernetes/klog/pull/333)

#### New Contributors

- [@&open-telemetry#8203;harshanarayana](https://github.com/harshanarayana) made
their first contribution in
[https://github.com/kubernetes/klog/pull/332](https://github.com/kubernetes/klog/pull/332)

**Full Changelog**:
kubernetes/klog@v2.60.1...v2.70.0

###
[`v2.60.1`](https://github.com/kubernetes/klog/releases/tag/v2.60.1):
Prepare klog release for Kubernetes v1.24 (Take 6)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.60.0...v2.60.1)

#### What's Changed

- Cleanup OWNERS file by
[@&open-telemetry#8203;serathius](https://github.com/serathius) in
[https://github.com/kubernetes/klog/pull/309](https://github.com/kubernetes/klog/pull/309)
- dependencies: avoid k8s.io/utils, fork clock code instead by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/310](https://github.com/kubernetes/klog/pull/310)
- promote contextual logging APIs to stable by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/311](https://github.com/kubernetes/klog/pull/311)

**Full Changelog**:
kubernetes/klog@v2.60.0...v2.60.1

###
[`v2.60.0`](https://github.com/kubernetes/klog/releases/tag/v2.60.0):
Prepare klog release for Kubernetes v1.24 (Take 5)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.50.2...v2.60.0)

#### What's Changed

- SetContextualLogger: remove unintentionally merged API call by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/308](https://github.com/kubernetes/klog/pull/308)

**Full Changelog**:
kubernetes/klog@v2.50.2...v2.60.0

###
[`v2.50.2`](https://github.com/kubernetes/klog/compare/v2.50.1...v2.50.2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.50.1...v2.50.2)

###
[`v2.50.1`](https://github.com/kubernetes/klog/releases/tag/v2.50.1):
Prepare klog release for Kubernetes v1.24 (Take 4)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.50.0...v2.50.1)

#### What's Changed

- SetLoggerWithOptions: support flushing by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/306](https://github.com/kubernetes/klog/pull/306)

**Full Changelog**:
kubernetes/klog@v2.50.0...v2.50.1

###
[`v2.50.0`](https://github.com/kubernetes/klog/releases/tag/v2.50.0):
Prepare klog release for Kubernetes v1.24 (Take 3)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.40.1...v2.50.0)

#### What's Changed

- Panic on empty info with custom logr by
[@&open-telemetry#8203;jklaw90](https://github.com/jklaw90) in
[https://github.com/kubernetes/klog/pull/283](https://github.com/kubernetes/klog/pull/283)
- Add missing Depth logging functions. by
[@&open-telemetry#8203;s3rj1k](https://github.com/s3rj1k) in
[https://github.com/kubernetes/klog/pull/280](https://github.com/kubernetes/klog/pull/280)
- fix typo in klog.go by
[@&open-telemetry#8203;cocaccola](https://github.com/cocaccola) in
[https://github.com/kubernetes/klog/pull/270](https://github.com/kubernetes/klog/pull/270)
- Update README.md by
[@&open-telemetry#8203;noaabarki](https://github.com/noaabarki) in
[https://github.com/kubernetes/klog/pull/281](https://github.com/kubernetes/klog/pull/281)
- log filter: ignored by V, used during log call by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/290](https://github.com/kubernetes/klog/pull/290)
- SetLogger/ClearLogger/SetLogFilter cleanup by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/289](https://github.com/kubernetes/klog/pull/289)
- fixes for PR
[#&open-telemetry#8203;280](https://github.com/kubernetes/klog/issues/280),
refactoring, textlogger, unit test by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/287](https://github.com/kubernetes/klog/pull/287)
- klogr verbosity by [@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/295](https://github.com/kubernetes/klog/pull/295)
- test: fix Go version matrix by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/298](https://github.com/kubernetes/klog/pull/298)
- handle panics in MarshalLog, Error, String by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/299](https://github.com/kubernetes/klog/pull/299)
- Fix goroutine leak: make flushDaemon stoppable by
[@&open-telemetry#8203;katexochen](https://github.com/katexochen) in
[https://github.com/kubernetes/klog/pull/293](https://github.com/kubernetes/klog/pull/293)
- structured logging: replacing Fatal/Exit/etc. without loss of flushing
by [@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/303](https://github.com/kubernetes/klog/pull/303)
- contextual logging by [@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/296](https://github.com/kubernetes/klog/pull/296)
- remove side effects of tests by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/305](https://github.com/kubernetes/klog/pull/305)
- tests: stop testing with Go 1.14 by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/304](https://github.com/kubernetes/klog/pull/304)

#### New Contributors

- [@&open-telemetry#8203;jklaw90](https://github.com/jklaw90) made their first
contribution in
[https://github.com/kubernetes/klog/pull/283](https://github.com/kubernetes/klog/pull/283)
- [@&open-telemetry#8203;s3rj1k](https://github.com/s3rj1k) made their first
contribution in
[https://github.com/kubernetes/klog/pull/280](https://github.com/kubernetes/klog/pull/280)
- [@&open-telemetry#8203;cocaccola](https://github.com/cocaccola) made their first
contribution in
[https://github.com/kubernetes/klog/pull/270](https://github.com/kubernetes/klog/pull/270)
- [@&open-telemetry#8203;noaabarki](https://github.com/noaabarki) made their first
contribution in
[https://github.com/kubernetes/klog/pull/281](https://github.com/kubernetes/klog/pull/281)
- [@&open-telemetry#8203;katexochen](https://github.com/katexochen) made their first
contribution in
[https://github.com/kubernetes/klog/pull/293](https://github.com/kubernetes/klog/pull/293)

**Full Changelog**:
kubernetes/klog@v2.40.1...v2.50.0

###
[`v2.40.1`](https://github.com/kubernetes/klog/releases/tag/v2.40.1):
Prepare klog release for Kubernetes v1.24 (Take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.40.0...v2.40.1)

#### What's Changed

- Using OS targeted go files to separate out the username logic. by
[@&open-telemetry#8203;phillipsj](https://github.com/phillipsj) in
[https://github.com/kubernetes/klog/pull/271](https://github.com/kubernetes/klog/pull/271)
- Recover from nil pointers when logging by
[@&open-telemetry#8203;dims](https://github.com/dims) in
[https://github.com/kubernetes/klog/pull/279](https://github.com/kubernetes/klog/pull/279)

#### New Contributors

- [@&open-telemetry#8203;phillipsj](https://github.com/phillipsj) made their first
contribution in
[https://github.com/kubernetes/klog/pull/271](https://github.com/kubernetes/klog/pull/271)

**Full Changelog**:
kubernetes/klog@v2.40.0...v2.40.1

###
[`v2.40.0`](https://github.com/kubernetes/klog/releases/tag/v2.40.0):
Prepare klog release for Kubernetes v1.24

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.30.0...v2.40.0)

#### What's Changed

- structured logging: support values with line breaks by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/273](https://github.com/kubernetes/klog/pull/273)
- Fix klog lock release on panic error by
[@&open-telemetry#8203;astraw99](https://github.com/astraw99) in
[https://github.com/kubernetes/klog/pull/272](https://github.com/kubernetes/klog/pull/272)
- add format test for KObjs by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/276](https://github.com/kubernetes/klog/pull/276)
- add Verbose.InfoSDepth by [@&open-telemetry#8203;pohly](https://github.com/pohly)
in
[https://github.com/kubernetes/klog/pull/277](https://github.com/kubernetes/klog/pull/277)

#### Known Issues

-
[https://github.com/kubernetes/klog/issues/278](https://github.com/kubernetes/klog/issues/278)

#### New Contributors

- [@&open-telemetry#8203;astraw99](https://github.com/astraw99) made their first
contribution in
[https://github.com/kubernetes/klog/pull/272](https://github.com/kubernetes/klog/pull/272)

**Full Changelog**:
kubernetes/klog@v2.30.0...v2.40.0

###
[`v2.30.0`](https://github.com/kubernetes/klog/releases/tag/v2.30.0):
Prepare klog release for Kubernetes v1.23 (take 2)

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.20.0...v2.30.0)

#### What's Changed

- Fix logcheck exit function by
[@&open-telemetry#8203;luyou86](https://github.com/luyou86) in
[https://github.com/kubernetes/klog/pull/265](https://github.com/kubernetes/klog/pull/265)
- custom marshaler for ObjectRef by
[@&open-telemetry#8203;pohly](https://github.com/pohly) in
[https://github.com/kubernetes/klog/pull/266](https://github.com/kubernetes/klog/pull/266)

#### New Contributors

- [@&open-telemetry#8203;luyou86](https://github.com/luyou86) made their first
contribution in
[https://github.com/kubernetes/klog/pull/265](https://github.com/kubernetes/klog/pull/265)

**Full Changelog**:
kubernetes/klog@v2.20.0...v2.30.0

###
[`v2.20.0`](https://github.com/kubernetes/klog/releases/tag/v2.20.0):
Prepare klog release for Kubernetes v1.23

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.10.0...v2.20.0)

Changes are here :
kubernetes/klog@v2.10.0...v2.20.0

since we moved to logr v1.0.0, there are incompatible changes:

    - klogger.Enabled: changed from func() bool to func(int) bool
- klogger.Info: changed from func(string, ...interface{}) to func(int,
string, ...interface{})
    - klogger.V: removed
- klogger.WithCallDepth: changed from func(int)
github.com/go-logr/logr.Logger to func(int)
github.com/go-logr/logr.LogSink
- klogger.WithName: changed from func(string)
github.com/go-logr/logr.Logger to func(string)
github.com/go-logr/logr.LogSink
- klogger.WithValues: changed from func(...interface{})
github.com/go-logr/logr.Logger to func(...interface{})
github.com/go-logr/logr.LogSink

[`83653a6`](https://github.com/kubernetes/klog/commit/83653a6deebf)
Update to newest versions of golang 1.17.x
[`d648c2e`](https://github.com/kubernetes/klog/commit/d648c2e42d30)
fix file-based filtering symbolization
[`8ee3d65`](https://github.com/kubernetes/klog/commit/8ee3d652c96b)
export ClearLogger
[`4171f3c`](https://github.com/kubernetes/klog/commit/4171f3c1be1b)
Switching to logr tag v1.0.0
[`9ab3c2b`](https://github.com/kubernetes/klog/commit/9ab3c2b56cb2)
add serathius as approvers of klog

###
[`v2.10.0`](https://github.com/kubernetes/klog/releases/tag/v2.10.0):
One more change to support 1.22 release

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.9.0...v2.10.0)

Changes are here :
kubernetes/klog@v2.9.0...v2.10.0

new function added:

    func KObjs(arg interface{}) []ObjectRef

###
[`v2.9.0`](https://github.com/kubernetes/klog/releases/tag/v2.9.0):
Prepare release for Kubernetes v1.22

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.8.0...v2.9.0)

Changes are here :
kubernetes/klog@v2.8.0...v2.9.0

[`6a9ef3f`](https://github.com/kubernetes/klog/commit/6a9ef3fa9a15)
fix typo
[`59f7cb5`](https://github.com/kubernetes/klog/commit/59f7cb505f58)
fix byte array display in InfoS and ErrorS
[`cf22f1e`](https://github.com/kubernetes/klog/commit/cf22f1e79721)
Call logr with call depth
[`e95c7e3`](https://github.com/kubernetes/klog/commit/e95c7e303755)
make SetLogger thread-safe
[`2728fe1`](https://github.com/kubernetes/klog/commit/2728fe192acc)
check usage of format specifier in structured log func
[`a18bc97`](https://github.com/kubernetes/klog/commit/a18bc976a212)
Fix by pr suggestions
[`4e4135c`](https://github.com/kubernetes/klog/commit/4e4135c3dd8a)
Add check for InfoS & ErrorS parameters

###
[`v2.8.0`](https://github.com/kubernetes/klog/releases/tag/v2.8.0):
Bug fixes for structured logging for Kubernetes v1.21

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.7.0...v2.8.0)

###
[`v2.7.0`](https://github.com/kubernetes/klog/releases/tag/v2.7.0):
Miscellaneous fixes for structured logging for Kubernetes v1.21

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.6.0...v2.7.0)

Changes are here :
kubernetes/klog@v2.6.0...v2.7.0

###
[`v2.6.0`](https://github.com/kubernetes/klog/releases/tag/v2.6.0):
Adding a linter for Kubernetes v1.21

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.5.0...v2.6.0)

Changes are here :
kubernetes/klog@v2.5.0...v2.6.0

please see
https://github.com/kubernetes/klog/tree/master/hack/tools/logcheck

###
[`v2.5.0`](https://github.com/kubernetes/klog/releases/tag/v2.5.0):
Prepare release for Kubernetes v1.21

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.4.0...v2.5.0)

Changes are here :
kubernetes/klog@v2.4.0...v2.5.0

klog.go has new API:

+func ErrorSDepth(depth int, err error, msg string, keysAndValues
...interface{}) {
+func InfoSDepth(depth int, msg string, keysAndValues ...interface{}) {

klogr/klogr.go has new API:

    func (l klogger) WithCallDepth(depth int) logr.Logger {
    func NewWithOptions(options ...Option) logr.Logger {
    func WithFormat(format Format) Option {

###
[`v2.4.0`](https://github.com/kubernetes/klog/releases/tag/v2.4.0):
Prepare release for Kubernetes v1.20

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.3.0...v2.4.0)

Changes are here :
kubernetes/klog@v2.3.0...v2.4.0

###
[`v2.3.0`](https://github.com/kubernetes/klog/releases/tag/v2.3.0):
Fix Typo-ed Method Error -&gt; ErrorS

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.2.0...v2.3.0)

Changes are here :
kubernetes/klog@v2.2.0...v2.3.0

###
[`v2.2.0`](https://github.com/kubernetes/klog/releases/tag/v2.2.0):
Dependency update and bugfix for InfoS

[Compare
Source](https://github.com/kubernetes/klog/compare/2.1.0...v2.2.0)

- [`2e691eb`](https://github.com/kubernetes/klog/commit/2e691eb3eeb3)
Fix missing fields in verbose InfoS
- [`966c986`](https://github.com/kubernetes/klog/commit/966c98681ca0)
feat use go-logr v0.2.0

Changes are here :
kubernetes/klog@v2.1.0...v2.2.0

###
[`v2.1.0`](https://github.com/kubernetes/klog/releases/tag/v2.1.0):
Better support for Structured Logging

[Compare
Source](https://github.com/kubernetes/klog/compare/v2.0.0...2.1.0)

We are now enforcing API compatibility, added Windows based tests, and
have tweaked the structured logging methods after some real world
experience updating kubernetes main repo.

- [`bbd9ca1`](https://github.com/kubernetes/klog/commit/bbd9ca1) Add
tests for error in InfoS
- [`1ccc0e1`](https://github.com/kubernetes/klog/commit/1ccc0e1) fix
imported bug time encode format form kvlistFormat
- [`dd4d1a6`](https://github.com/kubernetes/klog/commit/dd4d1a6) fix
typo in README.md
- [`49123d4`](https://github.com/kubernetes/klog/commit/49123d4)
ErrorS(nil, ...) should call loggr.Error(nil, ...)
- [`5b199cd`](https://github.com/kubernetes/klog/commit/5b199cd) Fix
documentation for V(level)
- [`d1eb30f`](https://github.com/kubernetes/klog/commit/d1eb30f) Add
apidiff script to check go signature changes
- [`dc505bf`](https://github.com/kubernetes/klog/commit/dc505bf)
Switch slack channel to #klog
- [`a47ebb9`](https://github.com/kubernetes/klog/commit/a47ebb9) Add
example for co-existence of klog v1 and v2
- [`134f148`](https://github.com/kubernetes/klog/commit/134f148)
logName(): lazily lookup userName instead of on init()
- [`db06a1b`](https://github.com/kubernetes/klog/commit/db06a1b) fix
serialization of special html chars
- [`5727d2a`](https://github.com/kubernetes/klog/commit/5727d2a) Fix
Windows integration tests
- [`edbc1d3`](https://github.com/kubernetes/klog/commit/edbc1d3)
test(\*): TestRollover failed randomly on Windows
- [`6f99060`](https://github.com/kubernetes/klog/commit/6f99060) Add
LogToStderr, a programatic way to log exclusively to stderr or not

###
[`v2.0.0`](https://github.com/kubernetes/klog/releases/tag/v2.0.0):
Release to support Kubernetes v1.19

[Compare
Source](https://github.com/kubernetes/klog/compare/v1.0.0...v2.0.0)

Beware of type change: `Verbose`

New Methods:

-   `SetLogger` (override logger to set a custom implementation)
-   `InfoS` (structured logging)
-   `ErrorS` (structured logging)

Changes are here :
kubernetes/klog@v2.0.0-rc.1...v2.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), 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.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44Ny4yIiwidXBkYXRlZEluVmVyIjoiMzcuODcuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
Co-authored-by: Yang Song <songy23@users.noreply.github.com>
Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants