Documentation
¶
Index ¶
- func Any(key string, value interface{}) logrus.Fields
- func Error(err error) logrus.Fields
- func FieldAddr(value string) logrus.Fields
- func FieldErr(err error) logrus.Fields
- func FieldErrKind(value string) logrus.Fields
- func FieldKey(value string) logrus.Fields
- func FieldMethod(value string) logrus.Fields
- func FieldMod(value string) logrus.Fields
- func NamedError(key string, err error) logrus.Fields
- func NowTime() logrus.Fields
- func Skip() logrus.Fields
- func String(key, value string) logrus.Fields
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FieldAddr ¶
依赖的实例名称。以mysql为例,"dsn = "root:juno@tcp(127.0.0.1:3306)/juno?charset=utf8",addr为 "127.0.0.1:3306"
func NamedError ¶
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.