Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultTimestampFormat = time.RFC3339
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONFormatter ¶
type JSONFormatter struct {
log.JSONFormatter
}
type TextFormatter ¶
type TextFormatter struct { log.TextFormatter sync.Once // contains filtered or unexported fields }
TextFormatter generates golf-enabled logs in plain-text formt.
The Formatter interface is used to implement a custom Formatter. It takes an `Entry`. It exposes all the fields, including the default ones:
* `entry.Data["msg"]`. The message passed from Info, Warn, Error .. * `entry.Data["time"]`. The timestamp. * `entry.Data["level"]. The level the entry was logged at.
Any additional fields added with `WithField` or `WithFields` are also in `entry.Data`. Format is expected to return an array of bytes which are then logged to `logger.Out`.
More information at https://github.com/akutz/logrus/blob/master/formatter.go
Click to show internal directories.
Click to hide internal directories.