Documentation
¶
Overview ¶
nolint
Index ¶
Constants ¶
View Source
const ( FieldKeyMsg = "msg" FieldKeyLevel = "level" FieldKeyTime = "time" FieldKeyLogError = "log_error" FieldKeyFunc = "func" FieldKeyFile = "file" )
Default key names for the default fields
Variables ¶
This section is empty.
Functions ¶
func JsonWithConfig ¶
func JsonWithConfig(cfg log.JsonFormatterConfig) func(f *JsonFormatter)
Types ¶
type FieldMap ¶
type FieldMap map[fieldKey]string
FieldMap allows customization of the key names for default fields.
type JsonFormatter ¶
type JsonFormatter struct {
// contains filtered or unexported fields
}
JsonFormatter formats logs into parsable json
func NewJsonFormatter ¶
func NewJsonFormatter(options ...JsonOption) *JsonFormatter
type JsonOption ¶
type JsonOption func(f *JsonFormatter)
Click to show internal directories.
Click to hide internal directories.