log

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 11 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// LoggerCtxKey logger context key
	LoggerCtxKey = loggerKey{}
)

Functions

func Debug

func Debug(msg string, fields ...zap.Field)

func DebugCtx

func DebugCtx(ctx context.Context, msg string, fields ...zap.Field)

func Debugf

func Debugf(format string, args ...interface{})

func DebugfCtx

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

func Error

func Error(msg string, fields ...zap.Field)

func ErrorCtx

func ErrorCtx(ctx context.Context, msg string, fields ...zap.Field)

func Errorf

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

func ErrorfCtx

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

func Fatal

func Fatal(msg string, fields ...zap.Field)

func FatalCtx

func FatalCtx(ctx context.Context, msg string, fields ...zap.Field)

func Fatalf

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

func FatalfCtx

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

func GetLogDir

func GetLogDir() string

GetLogDir 返回日志路径

func GetLogger

func GetLogger(ctx context.Context) logger.Logger

func Info

func Info(msg string, fields ...zap.Field)

func InfoCtx

func InfoCtx(ctx context.Context, msg string, fields ...zap.Field)

func Infof

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

func InfofCtx

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

func NewKitLogger

func NewKitLogger(name string, level logger.Level) kitlog.Logger

NewKitLogger returns a Go kit log.Logger that sends

func Panic

func Panic(msg string, fields ...zap.Field)

func PanicCtx

func PanicCtx(ctx context.Context, msg string, fields ...zap.Field)

func Panicf

func Panicf(format string, args ...interface{})

func PanicfCtx

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

func Warn

func Warn(msg string, fields ...zap.Field)

func WarnCtx

func WarnCtx(ctx context.Context, msg string, fields ...zap.Field)

func Warnf

func Warnf(format string, args ...interface{})

func WarnfCtx

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

func WithLogger

func WithLogger(ctx context.Context, fields ...zap.Field) context.Context

WithLogger context 注入 logger

Types

This section is empty.

Jump to

Keyboard shortcuts

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