Documentation ¶
Overview ¶
Package fields provides custom log entry fields
Index ¶
- func EntryWithFields(fields ...LogEntryField) *logrus.Entry
- type LogEntryField
- func Color(color string) LogEntryField
- func DataStream(middleware interface{}, message string) []LogEntryField
- func Indentation(indentation int) LogEntryField
- func Info(info interface{}) LogEntryField
- func Message(message interface{}) LogEntryField
- func Middleware(middleware interface{}) LogEntryField
- func Run(run interface{}) LogEntryField
- func Symbol(symbol string) LogEntryField
- func WithReader(reader io.Reader) LogEntryField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EntryWithFields ¶
func EntryWithFields(fields ...LogEntryField) *logrus.Entry
EntryWithFields returns a new log entry containing the provided fields
Types ¶
type LogEntryField ¶
LogEntryField is a convenience function wrapper for log entry fields
Apply the function in order to make the required changes to a log entry
func Color ¶
func Color(color string) LogEntryField
Color provides a way of coloring a log entry
If no color is provided, a color will be chosen based on the log level.
func DataStream ¶
func DataStream(middleware interface{}, message string) []LogEntryField
DataStream is a convenience function for data stream logs
func Indentation ¶
func Indentation(indentation int) LogEntryField
Indentation sets an indentation level for the log entry
Note that indentation may be ignored at some log levels.
func Info ¶
func Info(info interface{}) LogEntryField
Info adds additional information to the log entry
func Message ¶
func Message(message interface{}) LogEntryField
Message adds a message to the log entry
func Middleware ¶
func Middleware(middleware interface{}) LogEntryField
Middleware adds information about the middleware context to the log entry
func Run ¶
func Run(run interface{}) LogEntryField
Run adds information about the pipeline run context to the log entry
func Symbol ¶
func Symbol(symbol string) LogEntryField
Symbol adds a symbol to illustrate the log entry
func WithReader ¶
func WithReader(reader io.Reader) LogEntryField
WithReader adds an io.Reader to the log entry
The data provided by the reader will be output to the log before the next entry. This is useful for nesting logs.