Documentation ¶
Index ¶
- func FromContextOrGlobal(ctx context.Context) logr.Logger
- func GetEncoding() string
- func GetLogLevel() (zap.AtomicLevel, string, error)
- func LoftLogLevel() string
- func LogFullCallerPath() bool
- func NewLogger(component string) (logr.Logger, error)deprecated
- func NewLoggerWithOptions(opts ...Option) (logr.Logger, error)
- func SetGlobalKlog(logger logr.Logger, kubernetesVerbosityLevel string) error
- type Option
- func WithComponentName(name string) Option
- func WithDevelopment(inDevelopment bool) Option
- func WithDisableStacktrace(disableStacktrace bool) Option
- func WithGlobalKlog(global bool) Option
- func WithGlobalZap(global bool) Option
- func WithLogEncoding(logEncoding string) Option
- func WithLogFullCallerPath(logFullCallerPath bool) Option
- func WithLogLevel(logLevel string) Option
- func WithOptionsFromEnv() Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromContextOrGlobal ¶
FromContextOrGlobal returns a logr.Logger from the given context or the global logger
func GetEncoding ¶
func GetEncoding() string
GetEncoding returns the log encoding; "console" or "json". (default: console)
func GetLogLevel ¶
func GetLogLevel() (zap.AtomicLevel, string, error)
GetLogLevel returns the zap log level and the kubernetes verbosity level
func LoftLogLevel ¶
func LoftLogLevel() string
LoftLogLevel returns the log level; "debug", "info", "warn", "error", "dpanic", "panic", "fatal". (default: info)
func LogFullCallerPath ¶
func LogFullCallerPath() bool
LogFullCallerPath returns true if the full caller path should be logged
func NewLoggerWithOptions ¶
NewLoggerWithOptions creates a new logr.Logger
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithComponentName ¶
func WithDevelopment ¶
func WithDisableStacktrace ¶
func WithGlobalKlog ¶
func WithGlobalZap ¶
func WithLogEncoding ¶
func WithLogFullCallerPath ¶
func WithLogLevel ¶
func WithOptionsFromEnv ¶
func WithOptionsFromEnv() Option
Click to show internal directories.
Click to hide internal directories.