logutil

package
v0.2.10-2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorPretty

func ColorPretty(args ...interface{})

func ErrField

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

func ErrRecord

func ErrRecord(log *zap.Logger, err error, fieldHandle ...func() Fields) bool

func FnStack

func FnStack(fn interface{}) zap.Field

func IfDebug added in v0.2.5

func IfDebug(log *zap.Logger, fn func(log *zap.Logger))

func IfError added in v0.2.5

func IfError(log *zap.Logger, fn func(log *zap.Logger))

func ListField added in v0.2.4

func ListField(name string, args ...interface{}) zap.Field

func LogOrErr

func LogOrErr(log *zap.Logger, msg string, fn func() result.Error, fields ...zap.Field)

func Names

func Names(names ...string) string

func OkOrFailed

func OkOrFailed(log *zap.Logger, msg string, fn func() result.Error, fields ...zap.Field)

func Pretty

func Pretty(a ...interface{})

Types

type Fields

type Fields = []zap.Field

type Map

type Map map[string]interface{}

func (Map) Fields

func (t Map) Fields() []zap.Field

Jump to

Keyboard shortcuts

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