logger

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: MIT Imports: 6 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
	config.LogConfig
}

func NewLogger

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

func (*Logger) Close

func (l *Logger) Close()

func (*Logger) Field

func (l *Logger) Field(key string, value interface{}) zap.Field

func (*Logger) FieldDuration

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

func (*Logger) FieldError

func (l *Logger) FieldError(err error) zap.Field

func (*Logger) FieldInt

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

func (*Logger) FieldString

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

Jump to

Keyboard shortcuts

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