mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
Changes to accommodate client-go changes and kube vendor update
to v1.18.0 Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
4c96ad3c85
commit
34fc1d847e
19
vendor/go.uber.org/zap/options.go
generated
vendored
19
vendor/go.uber.org/zap/options.go
generated
vendored
@ -20,7 +20,11 @@
|
||||
|
||||
package zap
|
||||
|
||||
import "go.uber.org/zap/zapcore"
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"go.uber.org/zap/zapcore"
|
||||
)
|
||||
|
||||
// An Option configures a Logger.
|
||||
type Option interface {
|
||||
@ -107,3 +111,16 @@ func AddStacktrace(lvl zapcore.LevelEnabler) Option {
|
||||
log.addStack = lvl
|
||||
})
|
||||
}
|
||||
|
||||
// IncreaseLevel increase the level of the logger. It has no effect if
|
||||
// the passed in level tries to decrease the level of the logger.
|
||||
func IncreaseLevel(lvl zapcore.LevelEnabler) Option {
|
||||
return optionFunc(func(log *Logger) {
|
||||
core, err := zapcore.NewIncreaseLevelCore(log.core, lvl)
|
||||
if err != nil {
|
||||
fmt.Fprintf(log.errorOutput, "failed to IncreaseLevel: %v", err)
|
||||
} else {
|
||||
log.core = core
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user