Documentation ¶
Index ¶
Constants ¶
View Source
const ( LevelDebug = "debug" LevelInfo = "info" LevelWarning = "warning" LevelError = "error" )
View Source
const ( KeyCaller = "caller" KeyStack = "stack" KeyTime = "time" )
View Source
const (
LevelKey = "level"
)
Variables ¶
View Source
var DefaultFilter = NewLevelFilter(LevelInfo)
View Source
var DefaultFormatter = JSONFormatter
View Source
var DefaultTimer = func() string { return time.Now().UTC().Format("2006-01-02 15:04:05") }
View Source
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.
Types ¶
Click to show internal directories.
Click to hide internal directories.