Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HostFieldName = "host" ModFieldName = "mod" )
Functions ¶
This section is empty.
Types ¶
type Formatter ¶
type Formatter func(interface{}) string
Formatter transforms the input into a formatted string.
type Writer ¶
type Writer struct {
// Out is the output destination.
Out io.Writer
// NoColor disables the colorized output.
NoColor bool
// TimeFormat specifies the format for timestamp in output.
TimeFormat string
// PartsOrder defines the order of parts in output.
PartsOrder []string
FormatTimestamp Formatter
FormatLevel Formatter
FormatCaller Formatter
FormatMessage Formatter
FormatFieldName Formatter
FormatFieldValue Formatter
FormatErrFieldName Formatter
FormatErrFieldValue Formatter
}
Writer parses the JSON input and writes it in an (optionally) colorized, human-friendly format to Out.
Click to show internal directories.
Click to hide internal directories.