logging

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

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyField

func AnyField(key string, val interface{}) zap.Field

func BoolField

func BoolField(key string, val bool) zap.Field

func ContextWithLogger

func ContextWithLogger(ctx context.Context, l *zap.Logger) context.Context

ContextWithLogger adds logger to context

func DurationField

func DurationField(key string, val time.Duration) zap.Field

func ErrorField

func ErrorField(err error) zap.Field

func GetLogger

func GetLogger() *zap.Logger

func Int64Field

func Int64Field(key string, val int64) zap.Field

func IntField

func IntField(key string, val int) zap.Field

func L

func L(ctx context.Context) *zap.Logger

func LoggerFromContext

func LoggerFromContext(ctx context.Context) *zap.Logger

LoggerFromContext returns logger from context

func Middleware

func Middleware(next http.Handler) http.Handler

func NewLogger

func NewLogger() *zap.Logger

func SetLevel

func SetLevel(level string)

func StringField

func StringField(key, val string) zap.Field

func StringsField

func StringsField(key string, val []string) zap.Field

func WithError

func WithError(ctx context.Context, err error) *zap.Logger

func WithField

func WithField(ctx context.Context, field zap.Field) *zap.Logger

func WithFields

func WithFields(ctx context.Context, fields ...zap.Field) *zap.Logger

Types

This section is empty.

Jump to

Keyboard shortcuts

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