Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Formatter ¶
type Formatter interface {
Format(entry *LogEntry) *bufferpool.Buffer
}
func FormatterFactory ¶
type FullFormatter ¶
type FullFormatter struct {
}
func NewFullFormatter ¶
func NewFullFormatter() *FullFormatter
func (*FullFormatter) Format ¶
func (ff *FullFormatter) Format(entry *LogEntry) *bufferpool.Buffer
type JSONFormatter ¶
type JSONFormatter struct {
}
func NewJSONFormatter ¶
func NewJSONFormatter() *JSONFormatter
func (*JSONFormatter) Format ¶
func (jf *JSONFormatter) Format(entry *LogEntry) *bufferpool.Buffer
type LogEntry ¶
type LogEntry struct {
Time time.Time `json:"time,omitempty"`
Level Level `json:"level,omitempty"`
SrcFile string `json:"srcf,omitempty"`
Line int `json:"line,omitempty"`
FuncName string `json:"func,omitempty"`
Msg string `json:"msg,omitempty"`
Marker string `json:"marker,omitempty"`
Err error `json:"error,omitempty"`
Fields Fields `json:"fields,omitempty"`
UseLoc bool `json:"-"`
}
func NewLogEntry ¶
func NewLogEntry() *LogEntry
type SimpleFormatter ¶
type SimpleFormatter struct {
}
func NewSimpleFormatter ¶
func NewSimpleFormatter() *SimpleFormatter
func (*SimpleFormatter) Format ¶
func (sf *SimpleFormatter) Format(entry *LogEntry) *bufferpool.Buffer
Click to show internal directories.
Click to hide internal directories.