logger

package
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Discard = zap.NewNop()

Functions

func FuncStack

func FuncStack(fn interface{}) zap.Field

func Id

func Id(id string) zap.Field

func Init

func Init()

func Name

func Name(name string) zap.Field

func New

func New(name string) *nameLogger

func WithErr

func WithErr(err error, fields ...zap.Field) []zap.Field

Types

type Fields

type Fields []zap.Field

type Logger

type Logger interface {
	With(args types.M) Logger
	WithErr(err error) Logger

	Debug(args ...interface{})
	Info(args ...interface{})
	Warn(args ...interface{})
	Error(args ...interface{})

	Debugf(format string, a ...interface{})
	Infof(format string, a ...interface{})
	Warnf(format string, a ...interface{})
	Errorf(format string, a ...interface{})

	Debugw(msg string, keysAndValues ...interface{})
	Infow(msg string, keysAndValues ...interface{})
	Warnw(msg string, keysAndValues ...interface{})
	Errorw(msg string, keysAndValues ...interface{})
}

func GetLog

func GetLog(ctx context.Context) Logger

Jump to

Keyboard shortcuts

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