Documentation ¶
Overview ¶
Package logrusutil implements some helpers for using logrus
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComponentInit ¶
func ComponentInit(component string)
ComponentInit is a syntax sugar for easier Init
func CreateDefaultFormatter ¶
CreateDefaultFormatter creates a default JSON formatter
func Init ¶
func Init(formatter *DefaultFieldsFormatter)
Init set Logrus formatter if DefaultFieldsFormatter.wrappedFormatter is nil &logrus.JSONFormatter{} will be used instead
Types ¶
type DefaultFieldsFormatter ¶
type DefaultFieldsFormatter struct { WrappedFormatter logrus.Formatter DefaultFields logrus.Fields PrintLineNumber bool }
DefaultFieldsFormatter wraps another logrus.Formatter, injecting DefaultFields into each Format() call, existing fields are preserved if they have the same key
Click to show internal directories.
Click to hide internal directories.