logger

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureTraceIDInCtx

func EnsureTraceIDInCtx(ctx context.Context) context.Context

func Error

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

func Errorf

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

func Fatal

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

func Fatalf

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

func Flush

func Flush()

func GetUUID

func GetUUID() string

GetUUID generates a uuid V4 with error and context concern

func Info

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

func Infof

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

func InitFlags

func InitFlags(flagset *flag.FlagSet)

func NewContext

func NewContext() context.Context

func ToJson

func ToJson(obj interface{}) string

func Warning

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

func Warningf

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

Types

type ContextKeyType

type ContextKeyType string

ContextKeyType context key

const (
	// TraceID context key name
	TraceID ContextKeyType = "TraceId"
)

type Verbose

type Verbose klog.Verbose

func V

func V(level klog.Level) Verbose

func (Verbose) Info

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

func (Verbose) Infof

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

Jump to

Keyboard shortcuts

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