logger

package
v1.0.1-0...-e52dcc8 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Any

func Any(key string, value interface{}) logrus.Fields

func Error

func Error(err error) logrus.Fields

Error is shorthand for the common idiom NamedError("error", err).

func FieldAddr

func FieldAddr(value string) logrus.Fields

依赖的实例名称。以mysql为例,"dsn = "root:juno@tcp(127.0.0.1:3306)/juno?charset=utf8",addr为 "127.0.0.1:3306"

func FieldErr

func FieldErr(err error) logrus.Fields

FieldErr ...

func FieldErrKind

func FieldErrKind(value string) logrus.Fields

FieldErrKind ...

func FieldKey

func FieldKey(value string) logrus.Fields

FieldKey ...

func FieldMethod

func FieldMethod(value string) logrus.Fields

FieldMethod ...

func FieldMod

func FieldMod(value string) logrus.Fields

模块

func NamedError

func NamedError(key string, err error) logrus.Fields

NamedError constructs a field that lazily stores err.Error() under the provided key. Errors which also implement fmt.Formatter (like those produced by github.com/pkg/errors) will also have their verbose representation stored under key+"Verbose". If passed a nil error, the field is a no-op.

For the common case in which the key is simply "error", the Error function is shorter and less repetitive.

func NowTime

func NowTime() logrus.Fields

func Skip

func Skip() logrus.Fields

Skip constructs a no-op field, which is often useful when handling invalid inputs in other Field constructors.

func String

func String(key, value string) logrus.Fields

构建打印结果

Types

This section is empty.

Jump to

Keyboard shortcuts

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