go_logger

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: MIT Imports: 4 Imported by: 0

README

go-logger

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Error(ctx context.Context, err error, fields ...zap.Field)
	Warn(ctx context.Context, msg string, fields ...zap.Field)
	Info(ctx context.Context, msg string, fields ...zap.Field)
	Debug(ctx context.Context, msg string, fields ...zap.Field)
	WrapError(ctx context.Context, err error, fields ...zap.Field) error
	Globalize()
	AddFields(fields ...zap.Field)
	ClearFields()
	ZapLogger() *zap.Logger
	io.Closer
}

func New

func New(name string, level string, prod bool, fields ...zap.Field) (Logger, error)

New zap logger with initial fields

func NewDevelopment

func NewDevelopment(name string, level string, fields ...zap.Field) (Logger, error)

NewDevelopment logger

func NewProduction

func NewProduction(name string, level string, fields ...zap.Field) (Logger, error)

NewProduction logger

Jump to

Keyboard shortcuts

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