Documentation ¶
Index ¶
- Constants
- func GetCurrentLogFile() *os.File
- func GetDebugLogger() *log.Logger
- func GetErrorLogger() *log.Logger
- func GetInfoLogger() *log.Logger
- func GetVerboseLogger() *log.Logger
- func GetWarningLogger() *log.Logger
- func LogDebug(format string, a ...interface{})
- func LogError(format string, a ...interface{})
- func LogInfo(format string, a ...interface{})
- func LogToFile(verbosity int, logFilePath string)
- func LogToStd(verbosity int)
- func LogToStdAndFile(verbosity int, logFilePath string)
- func LogVerbose(format string, a ...interface{})
- func LogWarning(format string, a ...interface{})
- func RotateLogFile(rotateName string, compress bool) (<-chan bool, error)
- func VerbosityStringToEnum(verbosity string) int
Constants ¶
const ( VDebug = iota VVerbose VInfo VWarn VError )
logging verbosity level enum
const ( LMStd = iota LMFile LMBoth )
logging mode
Variables ¶
This section is empty.
Functions ¶
func GetCurrentLogFile ¶
GetCurrentLogFile returns the current log file or nil if none.
func GetDebugLogger ¶
GetDebugLogger returns the log.Logger object used to output debug messages
func GetErrorLogger ¶
GetErrorLogger returns the log.Logger object used to output error messages
func GetInfoLogger ¶
GetInfoLogger returns the log.Logger object used to output info messages
func GetVerboseLogger ¶
GetVerboseLogger returns the log.Logger object used to output verbose messages
func GetWarningLogger ¶
GetWarningLogger returns the log.Logger object used to output warning messages
func LogDebug ¶
func LogDebug(format string, a ...interface{})
LogDebug outputs the given message to the debug log. It's arguments are the same as fmt.Printf()
func LogError ¶
func LogError(format string, a ...interface{})
LogError outputs the given message to the error log. It's arguments are the same as fmt.Printf()
func LogInfo ¶
func LogInfo(format string, a ...interface{})
LogInfo outputs the given message to the info log. It's arguments are the same as fmt.Printf()
func LogToFile ¶
LogToFile configures the loggers to output to the given log file. If the file exists, output is appended.
func LogToStd ¶
func LogToStd(verbosity int)
LogToStd configures the loggers to direct log output to stdout
func LogToStdAndFile ¶
LogToStdAndFile configures the loggers to output both to stdout and the given log file.
func LogVerbose ¶
func LogVerbose(format string, a ...interface{})
LogVerbose outputs the given message to the verbose log. It's arguments are the same as fmt.Printf()
func LogWarning ¶
func LogWarning(format string, a ...interface{})
LogWarning outputs the given message to the warning log. It's arguments are the same as fmt.Printf()
func RotateLogFile ¶
RotateLogFile rotates the current log file. That is to say the current log file is closed, renamed, and compressed. Then a new log file is opened. params:
rotateName - the name that the current log file should be renamed to. compress - if true the rotated log file is compressed.
return:
<-chan bool - channel that will be closed when gzip is complete. nil if no gzip compression or error. error - any error that might have occured during log rotation
func VerbosityStringToEnum ¶
VerbosityStringToEnum converts a verbosity string in to its enumerator equivalent
Types ¶
This section is empty.