logging

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field = zapcore.Field

func Duration

func Duration(k string, d time.Duration) Field

func Error

func Error(v error) Field

func Int

func Int(k string, i int) Field

func Int64

func Int64(k string, i int64) Field

func Object

func Object(key string, val zapcore.ObjectMarshaler) Field

func String

func String(k, v string) Field

func Uint64 added in v0.4.0

func Uint64(k string, i uint64) Field

type Logger

type Logger interface {
	Info(string, ...Field)
	Error(string, ...Field)
	Sync() error
	Debug(string, ...Field)
	With(fields ...Field) *zap.Logger
}

func New

func New(cfg config.Logger) (Logger, error)

func NewDevelopmentLogger

func NewDevelopmentLogger(dest string) (Logger, error)

func NewNopLogger

func NewNopLogger() (Logger, error)

func NewProductionLogger

func NewProductionLogger(dest string) (Logger, error)

type ObjectEncoder

type ObjectEncoder = zapcore.ObjectEncoder

Jump to

Keyboard shortcuts

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