logger

package
v0.0.0-...-fb86c62 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorField

func ErrorField(err error) zap.Field

Types

type Logger

type Logger struct {
	*zap.Logger
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(cfg *config.Config) (*Logger, error)

func (*Logger) Close

func (l *Logger) Close()

func (*Logger) Duration

func (l *Logger) Duration(key string, value time.Duration) zap.Field

func (*Logger) Error

func (l *Logger) Error(context contract.Context, msg string, fields *[]contract.Field)

func (*Logger) Field

func (l *Logger) Field(key string, value any) zap.Field

func (*Logger) Info

func (l *Logger) Info(context contract.Context, msg string, fields *[]contract.Field)

func (*Logger) Int

func (l *Logger) Int(key string, value int) zap.Field

func (*Logger) NewMessage

func (l *Logger) NewMessage(context contract.Context, msg string, fields *[]contract.Field) *contract.Message

func (*Logger) String

func (l *Logger) String(key string, value string) zap.Field

Jump to

Keyboard shortcuts

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