Documentation
¶
Index ¶
Constants ¶
const ( LevelDebug = "debug" LevelInfo = "info" LevelWarning = "warning" LevelError = "error" )
const ( KeyCaller = "caller" KeyStack = "stack" KeyTime = "time" )
const (
LevelKey = "level"
)
Variables ¶
var DefaultFilter = NewLevelFilter(LevelInfo)
var DefaultFormatter = JSONFormatter
var DefaultTimer = func() string { return time.Now().UTC().Format("2006-01-02 15:04:05") }
var DefaultWriter = os.Stdout
Functions ¶
func IsInvalidConfig ¶
func JSONFormatter ¶
JSONFormatter transforms the given map into the string representation of a simple JSON object. One specificity of JSONFormatter is that it treats the value of key "stack" differently. In case a key-value pair with the key "stack" is provided, the associated value is treated like a JSON object, and not like a JSON string. This difference in behaviour is unique compared to all other key-value pairs map may carry with it.