Skip to content

Commit

Permalink
Merge pull request #277 from pohly/v-infos
Browse files Browse the repository at this point in the history
add Verbose.InfoSDepth
  • Loading branch information
k8s-ci-robot authored Dec 17, 2021
2 parents 6963321 + b605dee commit 9248e72
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions klog.go
Original file line number Diff line number Diff line change
Expand Up @@ -1479,6 +1479,14 @@ func InfoSDepth(depth int, msg string, keysAndValues ...interface{}) {
logging.infoS(logging.logr, logging.filter, depth, msg, keysAndValues...)
}

// InfoSDepth is equivalent to the global InfoSDepth function, guarded by the value of v.
// See the documentation of V for usage.
func (v Verbose) InfoSDepth(depth int, msg string, keysAndValues ...interface{}) {
if v.enabled {
logging.infoS(v.logr, v.filter, depth, msg, keysAndValues...)
}
}

// Deprecated: Use ErrorS instead.
func (v Verbose) Error(err error, msg string, args ...interface{}) {
if v.enabled {
Expand Down

0 comments on commit 9248e72

Please sign in to comment.