log

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugLevel = int(zapcore.DebugLevel)
)

Variables

View Source
var Options = &zap.Options{
	Development: true,

	StacktraceLevel: zapcore.DPanicLevel,
	TimeEncoder:     zapcore.RFC3339NanoTimeEncoder,
	Level:           zzap.NewAtomicLevelAt(zapcore.InfoLevel),

	EncoderConfigOptions: []zap.EncoderConfigOption{func(ec *zapcore.EncoderConfig) { ec.CallerKey = "caller" }},
	ZapOpts:              []zzap.Option{zzap.AddCaller()},
}

Options stores controller-runtime (zap) log config

Functions

func BindFlags

func BindFlags(fs *flag.FlagSet)

BindFlags binds controller-runtime logging flags to provided flag Set

func GetLogLevel

func GetLogLevel() string

GetLogLevel returns the current logging level

func InitLog

func InitLog()

InitLog initializes controller-runtime log (zap log) this should be called once Options have been initialized either by parsing flags or directly modifying Options.

func SetLogLevel

func SetLogLevel(lvl string) error

SetLogLevel sets current logging level to the provided lvl

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL