package formatter
Import Path
github.com/antonfisher/nested-logrus-formatter (on go.dev)
Dependency Relation
imports 7 packages, and imported by one package
Involved Source Files
formatter.go
Package-Level Type Names (only one, which is exported)
Formatter - logrus formatter, implements logrus.Formatter
CallerFirst - print caller info first
CustomCallerFormatter - set custom formatter for caller info
FieldsOrder - default: fields sorted alphabetically
HideKeys - show [fieldValue] instead of [fieldKey:fieldValue]
NoColors - disable colors
NoFieldsColors - apply colors only to the level, default is level + fields
NoFieldsSpace - no space between fields
NoUppercaseLevel - no upper case for level value
ShowFullLevel - show a full level [WARNING] instead of [WARN]
TimestampFormat - default: time.StampMilli = "Jan _2 15:04:05.000"
TrimMessages - trim whitespaces on messages
Format an log entry
(*T) writeCaller(b *bytes.Buffer, entry *logrus.Entry)
(*T) writeField(b *bytes.Buffer, entry *logrus.Entry, field string)
(*T) writeFields(b *bytes.Buffer, entry *logrus.Entry)
(*T) writeOrderedFields(b *bytes.Buffer, entry *logrus.Entry)
*T : github.com/sirupsen/logrus.Formatter
Package-Level Functions (only one, which is unexported)
Package-Level Constants (total 4, none are exported)
The pages are generated with Golds v0.3.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |