log

package
v2.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Expose methods under the package for shorter reference
	Debug func(string, ...zap.Field)
	Info  func(string, ...zap.Field)
	Warn  func(string, ...zap.Field)
	Error func(string, ...zap.Field)
	Panic func(string, ...zap.Field)
	With  func(...zap.Field) *zap.Logger
)

Functions

func HandlerDebug

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

wrap debug with handler name

func HandlerError

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

wrap error with handler name

func HandlerInfo

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

wrap info with handler name

func HandlerPanic

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

wrap error with handler name

func HandlerWarn

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

wrap warn with handler name

func HandlerWarnErr

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

LogWarnErr logs an error at warn level and returns the same message

func SetLoggerContextFields

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

SetLoggerContextFields sets a custom zap.Field into the current context to be recorded by the logger when used, and returns new context

Types

This section is empty.

Jump to

Keyboard shortcuts

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