Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLJsonLogFormatter ¶
NewLJsonLogFormatter Factory for the newline-delimited JSON formatter
Types ¶
type JsonLine ¶
type JsonLine struct {
Time string `json:"timestamp"`
Level log.LevelString `json:"level"`
Message string `json:"message,omitempty"`
Details interface{} `json:"details,omitempty"`
}
JsonLine is the line object in the LJSON format
type LogFormatter ¶
type LogFormatter struct {
}
LogFormatter newline-delimited JSON log formatter
func (*LogFormatter) Format ¶
func (formatter *LogFormatter) Format(level log.Level, message string) []byte
Format formats a string message
func (*LogFormatter) FormatData ¶
func (formatter *LogFormatter) FormatData(level log.Level, data interface{}) []byte
FormatData formats a data object
Click to show internal directories.
Click to hide internal directories.