Documentation ¶
Overview ¶
Package dlog provides logging functions with caller file and line information, logging levels and level and text filters.
We'll probably replace this with an independent logging library down the line
Index ¶
- func CreateLogFile()
- func Error(in ...interface{})
- func ErrorCheck(in error)
- func FileWrite(in ...interface{})
- func Info(in ...interface{})
- func SetDebugFilter(filter string)
- func SetDebugLevel(dL LogLevel)
- func SetStringDebugLevel(debugL string)
- func Verb(in ...interface{})
- func Warn(in ...interface{})
- type LogLevel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateLogFile ¶
func CreateLogFile()
CreateLogFile creates a file in the 'logs' directory of the starting point of this program to write logs to
func ErrorCheck ¶ added in v1.4.0
func ErrorCheck(in error)
ErrorCheck checks that the input is not nil, then calls Error on it if it is not. Otherwise it does nothing.
func FileWrite ¶
func FileWrite(in ...interface{})
FileWrite runs dLog, but JUST writes to file instead of also to stdout.
func Info ¶
func Info(in ...interface{})
Info will write a dLog if the debug level is higher than WARN
func SetDebugFilter ¶
func SetDebugFilter(filter string)
SetDebugFilter sets the string which determines what debug messages get printed. Only messages which contain the filer as a pseudo-regex
func SetDebugLevel ¶
func SetDebugLevel(dL LogLevel)
SetDebugLevel sets what message levels of debug will be printed.
func SetStringDebugLevel ¶
func SetStringDebugLevel(debugL string)
SetStringDebugLevel parses the input string as one of the debug levels