logger

package
v0.0.0-...-8519efd Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: Apache-2.0 Imports: 6 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 - attach logger to context

func CloneWithLevel

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

CloneWithLevel - clone logger with level from context

func DebugKV

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

DebugKV - logger for debug

func ErrorKV

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

ErrorKV - logger for errors

func FatalKV

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

FatalKV - logger for fatal

func InfoKV

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

InfoKV - logger for info

func SetLevelFromContext

func SetLevelFromContext(ctx context.Context) context.Context

SetLevelFromContext - set logger level from grpc-metadata-log-level

func SetLogger

func SetLogger(newLogger *zap.SugaredLogger)

SetLogger - set global logger

func WarnKV

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

WarnKV - logger for warnings

func WithLevel

func WithLevel(lvl zapcore.Level) zap.Option

WithLevel - return zapcore with logger level

Types

This section is empty.

Jump to

Keyboard shortcuts

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