Documentation ¶
Index ¶
- func Error(err error, msg string, kvPairs ...interface{})
- func GetVerbosity() int
- func Info(msg string, kvPairs ...interface{})
- func SetLogger(logr logr.Logger)
- func SetVerbosity(v int)
- func SwitchMode(mode Mode) error
- func WithVerbosity(v int) func(*options)
- type Logger
- type Mode
- type Options
- type Verbose
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetVerbosity ¶ added in v0.4.0
func GetVerbosity() int
SetVerbosity prints out the global verbosity
func Info ¶
func Info(msg string, kvPairs ...interface{})
Info logs a non-error message with the given key/value pairs as context.
func SetVerbosity ¶
func SetVerbosity(v int)
SetVerbosity sets the global verbosity against which all logs will be compared.
func SwitchMode ¶ added in v0.4.0
SwitchMode changes the dafult zapr logger mode
func WithVerbosity ¶ added in v0.3.0
func WithVerbosity(v int) func(*options)
WithVerbosity sets Logger verbosity.
Types ¶
type Logger ¶
type Logger interface { Info(msg string, kvPairs ...interface{}) Error(err error, msg string, kvPairs ...interface{}) V(v int) Verbose WithValues(kvPairs ...interface{}) Logger WithName(name string) Logger SetLogger(logr logr.Logger) SetVerbosity(v int) Logger GetVerbosity() int }
Logger represents implementation of rlog logger
func DefuaultLogger ¶ added in v0.4.2
func DefuaultLogger() Logger
func WithValues ¶ added in v0.4.0
func WithValues(kvPairs ...interface{}) Logger
type Options ¶ added in v0.3.0
type Options func(*options)
Options configures how we set up the logger.
type Verbose ¶
type Verbose struct {
// contains filtered or unexported fields
}
Verbose is a boolean type that implements logr and records weather it is enabled.
Click to show internal directories.
Click to hide internal directories.