log

package
v0.0.0-...-2c42c2a Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(ctx context.Context, args ...interface{})

Error log

func Errorf

func Errorf(ctx context.Context, format string, args ...interface{})

Errorf log

func ErrorfDepth

func ErrorfDepth(ctx context.Context, depth int, format string, args ...interface{})

ErrorfDepth log

func Fatal

func Fatal(ctx context.Context, args ...interface{})

Fatal log

func Fatalf

func Fatalf(ctx context.Context, format string, args ...interface{})

func FatalfDepth

func FatalfDepth(ctx context.Context, depth int, format string, args ...interface{})

FatalfDepth log

func Flush

func Flush()

Flush the logger

func Info

func Info(ctx context.Context, args ...interface{})

Info log

func Infof

func Infof(ctx context.Context, format string, args ...interface{})

Infof log

func InfofDepth

func InfofDepth(ctx context.Context, depth int, format string, args ...interface{})

InfofDepth log

func SetLogger

func SetLogger(l Logger)

SetLogger is used to override the kronos logger. It should be called before initializing kronos

func V

func V(level int32) bool

V returns whether the given verbosity should be logged

func Warning

func Warning(ctx context.Context, args ...interface{})

Warning log

func Warningf

func Warningf(ctx context.Context, format string, args ...interface{})

Warningf log

func WarningfDepth

func WarningfDepth(ctx context.Context, depth int, format string, args ...interface{})

WarningfDepth log

func WithLogTag

func WithLogTag(ctx context.Context, name string, value interface{}) context.Context

WithLogTag returns a context with a log tag

Types

type Logger

type Logger interface {
	// Info log
	Info(ctx context.Context, args ...interface{})
	// Infof log
	Infof(ctx context.Context, format string, args ...interface{})
	// InfofDepth log
	InfofDepth(ctx context.Context, depth int, format string, args ...interface{})
	// Warning log
	Warning(ctx context.Context, args ...interface{})
	// Warningf log
	Warningf(ctx context.Context, format string, args ...interface{})
	// WarningfDepth log
	WarningfDepth(ctx context.Context, depth int, format string, args ...interface{})
	// Error log
	Error(ctx context.Context, args ...interface{})
	// Errorf log
	Errorf(ctx context.Context, format string, args ...interface{})
	// ErrorfDepth log
	ErrorfDepth(ctx context.Context, depth int, format string, args ...interface{})
	// Fatal log
	Fatal(ctx context.Context, args ...interface{})
	// Fatalf log
	Fatalf(ctx context.Context, format string, args ...interface{})
	// FatalfDepth log
	FatalfDepth(ctx context.Context, depth int, format string, args ...interface{})
	// V returns whether the given verbosity should be logged
	V(level int32) bool
	// WithLogTag returns a context with a log tag
	WithLogTag(ctx context.Context, name string, value interface{}) context.Context
	// Flush the logger
	Flush()
}

Logger can be be used to override the logger used by kronos

Jump to

Keyboard shortcuts

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