Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringToLevel ¶
StringToLevel returns a int based on name of level
Types ¶
type Formatter ¶
type Formatter interface {
Format(logLevel int, msg string, fields ...GenericField) string
}
Formatter is an interface that handles message format
type GenericField ¶
GenericField represents a simple key value field
type JSONFormatter ¶
type JSONFormatter struct{}
JSONFormatter implements Formatter interface
func NewJSONFormatter ¶
func NewJSONFormatter() *JSONFormatter
NewJSONFormatter returns a pointer of JSONFormatter
func (*JSONFormatter) Format ¶
func (j *JSONFormatter) Format(logLevel int, msg string, fields ...GenericField) string
Format is a implementation of Formatter.Format
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger ...
func (*Logger) Critical ¶
func (l *Logger) Critical(msg string, fields ...GenericField)
Critical ...
type SimpleFormatter ¶
type SimpleFormatter struct{}
SimpleFormatter implements Formatter interface
func NewSimpleFormatter ¶
func NewSimpleFormatter() *SimpleFormatter
NewSimpleFormatter returns a pointer of SimpleFormatter
func (*SimpleFormatter) Format ¶
func (s *SimpleFormatter) Format(logLevel int, msg string, fields ...GenericField) string
Format is a implementation of Formatter.Format
Click to show internal directories.
Click to hide internal directories.