Documentation
¶
Index ¶
Constants ¶
View Source
const ( FATAL RESULT WARNING INFO VERBOSE DEBUG )
verbosity
Variables ¶
View Source
var ( // GetVerbosity returns the current verbosity level GetVerbosity func() int // LoggerFatal is written to for FATAL level logging LoggerFatal = log.New(os.Stderr, "[FATAL] ", 0) // LoggerResult is written to for RESULT level logging LoggerResult = log.New(os.Stdout, "", 0) // LoggerWarning is written to for WARNING level logging LoggerWarning = log.New(os.Stderr, "[!] ", 0) // LoggerInfo is written to for INFO level logging LoggerInfo = log.New(os.Stdout, "[+] ", 0) // LoggerVerbose is written to for VERBOSE level logging LoggerVerbose = log.New(os.Stdout, "[>] ", 0) // LoggerDebug is written to for DEBUG level logging LoggerDebug = log.New(os.Stdout, "[D] ", 0) )
Functions ¶
func FatalOnErr ¶
FatalOnErr logs and calls os.Exit(1) if the error != nil
func GetVerbosityWith ¶
func GetVerbosityWith(v func() int)
GetVerbosityWith sets the function used to load the current verbosity level
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.