logger

package
v0.0.0-...-53bcd79 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Log *zap.Logger
)

Functions

func Enabled

func Enabled() bool

func Error

func Error(err error) zap.Field

func Flags

func Flags(fs *pflag.FlagSet)

Flags sets the flag of logger. We can't receive *cli.FlagSet directly due to avoid cycle dependency.

func HijackLogrus

func HijackLogrus(logger *logrus.Logger)

func HijackStandardLogrus

func HijackStandardLogrus()

func Init

func Init() error

func KubernetesObject

func KubernetesObject(key string, obj runtime.Object) zap.Field

func NewBufferLogger

func NewBufferLogger(w io.Writer) *zap.Logger

func OutputStderr

func OutputStderr()

func OverrideKlog

func OverrideKlog() error

func SetLogLevel

func SetLogLevel(level string)

func StackTrace

func StackTrace(err error) zap.Field

func StandardLogger

func StandardLogger(name string) *log.Logger

func Verbose

func Verbose(err error) zap.Field

Types

type NamedWriter

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

func NewNamedWriter

func NewNamedWriter(w io.Writer, name string) *NamedWriter

func (*NamedWriter) Write

func (w *NamedWriter) Write(b []byte) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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