Documentation ¶
Index ¶
- Constants
- func AddListener(id string, messageChannel chan string) error
- func Debug(args ...interface{})
- func Error(args ...interface{})
- func Fatal(args ...interface{})
- func GetLevelFromString(levelString string) level
- func Info(args ...interface{})
- func RemoveListener(id string)
- func SetLogLevel(newLevel level)
- func SetTimeout(newTimeout time.Duration)
- func ToConsole(logToConsole bool)
- func Verbose(args ...interface{})
- func WTF(args ...interface{})
- func Warning(args ...interface{})
Constants ¶
View Source
const ( LevelWTF level = iota - 1 LevelInfo LevelFatal LevelError LevelWarning LevelDebug LevelVerbose )
Variables ¶
This section is empty.
Functions ¶
func AddListener ¶
AddListener will start broadcasting all log entries to the provided channe
func GetLevelFromString ¶
func GetLevelFromString(levelString string) level
func Info ¶
func Info(args ...interface{})
Info will create a log entry you intentionally want to display to users
func RemoveListener ¶
func RemoveListener(id string)
RemoveListener removes the provided ID from the list of listeners
func SetLogLevel ¶
func SetLogLevel(newLevel level)
SetLogLevel will set the level of logging verbosity. Default = LevelWarning
func SetTimeout ¶
SetTimeout sets the time until we stop trying to notify a listener and discard the log
func ToConsole ¶
func ToConsole(logToConsole bool)
ToConsole controls whether to log to console or not
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.