Documentation ¶
Overview ¶
Package logrusutil implements some helpers for using logrus
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultFieldsFormatter ¶
type DefaultFieldsFormatter struct { WrappedFormatter logrus.Formatter DefaultFields logrus.Fields }
DefaultFieldsFormatter wraps another logrus.Formatter, injecting DefaultFields into each Format() call, existing fields are preserved if they have the same key
func NewDefaultFieldsFormatter ¶
func NewDefaultFieldsFormatter( wrappedFormatter logrus.Formatter, defaultFields logrus.Fields, ) *DefaultFieldsFormatter
NewDefaultFieldsFormatter returns a DefaultFieldsFormatter, if wrappedFormatter is nil &logrus.JSONFormatter{} will be used instead
Click to show internal directories.
Click to hide internal directories.