log

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LoggerAtomicLevel = zap.NewAtomicLevelAt(zapcore.DebugLevel)
)

Functions

func NewAndInitLogger

func NewAndInitLogger(opts ...zap.Option) *zap.SugaredLogger

NewAndInitLogger create SugaredLogger with the filename, line number, and function name of zap's caller and set in developyment mode

func NewLogrStandardLogger

func NewLogrStandardLogger(opts ...zap.Option) logr.Logger

func NewZapLogger

func NewZapLogger(opts ...zap.Option) *zap.Logger

func ZapLoggerToSugaredLogger added in v1.1.0

func ZapLoggerToSugaredLogger(l *zap.Logger) *zap.SugaredLogger

Types

type LogLevel

type LogLevel struct {
	// contains filtered or unexported fields
}

LogLevel store zap atomic level

func (*LogLevel) Set

func (l *LogLevel) Set(flagValue string) error

Set implement pflag.Value Set(string)

func (*LogLevel) String

func (l *LogLevel) String() string

String implement pflag.Value String()

func (*LogLevel) Type

func (l *LogLevel) Type() string

Type return pflag type

func (*LogLevel) Value

func (l *LogLevel) Value() zapcore.Level

Value return zap core level value

Jump to

Keyboard shortcuts

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