Documentation ¶
Overview ¶
Package logger provides a logger for Centrifugo server. This is an adapted code from Steve Francia's jWalterWeatherman library - see https://github.com/spf13/jWalterWeatherman
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DEBUG *log.Logger INFO *log.Logger WARN *log.Logger ERROR *log.Logger CRITICAL *log.Logger FATAL *log.Logger LogHandle io.Writer = ioutil.Discard OutHandle io.Writer = os.Stdout BothHandle io.Writer = io.MultiWriter(LogHandle, OutHandle) Flag int = log.Ldate | log.Ltime | log.Lshortfile NotePads []*NotePad = []*NotePad{debug, info, warn, err, critical, fatal} )
View Source
var LevelMatches = map[string]Level{ "DEBUG": LevelDebug, "INFO": LevelInfo, "WARN": LevelWarn, "ERROR": LevelError, "CRITICAL": LevelCritical, "FATAL": LevelFatal, "NONE": LevelNone, }
Functions ¶
func SetLogFile ¶
func SetLogFile(path string)
Conveniently Sets the Log Handle to a io.writer created for the file behind the given filepath Will only append to this file
func SetLogFlag ¶
func SetLogFlag(flag int)
func SetLogThreshold ¶
func SetLogThreshold(level Level)
Establishes a threshold where anything matching or above will be logged
func SetStdoutThreshold ¶
func SetStdoutThreshold(level Level)
Establishes a threshold where anything matching or above will be output
Types ¶
Click to show internal directories.
Click to hide internal directories.