ljson

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLJsonLogFormatter

func NewLJsonLogFormatter() formatter.Formatter

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL