Documentation
¶
Index ¶
- func Debugw(msg string, keysAndValues ...interface{})
- func Errorw(msg string, err error, keysAndValues ...interface{})
- func GetLogger() logr.Logger
- func Infow(msg string, keysAndValues ...interface{})
- func InitFromConfig(conf Config, name string)
- func ParseZapLevel(level string) zapcore.Level
- func SetLogger(l logr.Logger, name string)
- func Warnw(msg string, err error, keysAndValues ...interface{})
- type Config
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitFromConfig ¶ added in v0.13.1
InitFromConfig initializes a Zap-based logger
func ParseZapLevel ¶ added in v0.13.1
Types ¶
type Config ¶ added in v0.13.1
type Config struct {
JSON bool `yaml:"json"`
Level string `yaml:"level"`
Sample bool `yaml:"sample,omitempty"`
// when sampling, the first N logs will be logged
SampleInitial int `yaml:"sampleInitial,omitempty"`
// when sampling, every Mth log will be logged
SampleInterval int `yaml:"sampleInitial,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.