logger

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachLogger

func AttachLogger(ctx context.Context, logger *zap.SugaredLogger) context.Context

AttachLogger - context attach logger

func CloneWithLevel

func CloneWithLevel(ctx context.Context, newLevel zapcore.Level) *zap.SugaredLogger

CloneWithLevel - clone logger with level

func Debug

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

func DebugF

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

func DebugKV

func DebugKV(ctx context.Context, message string, kvs ...interface{})

func Error

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

func ErrorKV

func ErrorKV(ctx context.Context, message string, kvs ...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 FatalKV

func FatalKV(ctx context.Context, message string, kvs ...interface{})

func Info

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

func InfoF

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

func InfoKV

func InfoKV(ctx context.Context, message string, kvs ...interface{})

func New

func New(level zapcore.LevelEnabler, options ...zap.Option) *zap.SugaredLogger

func NewWithSink

func NewWithSink(level zapcore.LevelEnabler, sink io.Writer, options ...zap.Option) *zap.SugaredLogger

func Panic

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

func PanicF

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

func PanicKV

func PanicKV(ctx context.Context, message string, kvs ...interface{})

func SetLevel

func SetLevel(l zapcore.Level)

func SetLogger

func SetLogger(l *zap.SugaredLogger)

func StrToZapLevel

func StrToZapLevel(str string) (zapcore.Level, bool)

StrToZapLevel - convert string to zap.level

func Warn

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

func WarnF

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

func WarnKV

func WarnKV(ctx context.Context, message string, kvs ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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