Documentation ¶
Index ¶
- Constants
- Variables
- func DeregisterLogListener(name string)
- func EvalToString(v interface{}) string
- func Log(processorID uint64, rootMonitorID uint64, level LogLevel, v ...interface{})
- func LogLevelMatch(l1, l2 interface{}) bool
- func RegisterLogListener(name string, listener LogFunc)
- type LogFunc
- type LogLevel
Constants ¶
View Source
const ( Debug LogLevel = "Debug" Info = "Info" Warning = "Warning" Error = "Error" Fatal = "Fatal" )
Log levels
Variables ¶
View Source
var LogLevelPriority = map[string]int{ fmt.Sprint(Debug): 1, fmt.Sprint(Info): 2, fmt.Sprint(Warning): 3, fmt.Sprint(Error): 4, fmt.Sprint(Fatal): 5, }
LogLevelPriority is a map assigning priorities to log level (lower number means a higher priority)
View Source
var StringToLoglevel = map[string]LogLevel{ fmt.Sprint(Debug): Debug, fmt.Sprint(Info): Info, fmt.Sprint(Warning): Warning, fmt.Sprint(Error): Error, fmt.Sprint(Fatal): Fatal, }
StringToLoglevel is a map assigning log levels to strings.
Functions ¶
func DeregisterLogListener ¶
func DeregisterLogListener(name string)
DeregisterLogListener deregisters an existing log listener.
func EvalToString ¶
func EvalToString(v interface{}) string
EvalToString should be used if an eval result should be converted into a string.
func Log ¶
Log logs a message
Types ¶
type LogFunc ¶
LogFunc is used to handle log messages - a processor and monitor id of 0 indicates a global log message
Directories ¶
Path | Synopsis |
---|---|
Package api contains functions for external code which wants to integrate with Brawler.
|
Package api contains functions for external code which wants to integrate with Brawler. |
Package parser contains the Rumble parser.
|
Package parser contains the Rumble parser. |
stdlib
|
|
util
Package util contains optional utility functions for Rumble.
|
Package util contains optional utility functions for Rumble. |
Click to show internal directories.
Click to hide internal directories.