Documentation
¶
Index ¶
- Constants
- type Logm
- func (l Logm) Error(message string, args ...interface{})
- func (l Logm) Info(message string, args ...interface{})
- func (l Logm) Log(logLevel int, logMessage string, logArgs ...interface{})
- func (l Logm) Verbose(message string, args ...interface{})
- func (l Logm) Warning(message string, args ...interface{})
Constants ¶
View Source
const ( LvlVerbose = 0 LvlInfo = 1 LvlOk = 2 LvlNotice = 3 LvlWarning = 4 LvlError = 5 LvlPanic = 6 LvlMute = 100 )
Log Level constants used for log-level filtering and coloring
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logm ¶
type Logm struct {
// DisableColor specifies if log output in console should use colors
DisableColor bool // = false
/*
Log level to be output. Verbose level (0) enables all, info level (1) enables info and more
important, warning level (2) enables warning, error and higher level, etc.
*/
LogLevel int
// contains filtered or unexported fields
}
Logm is an instance of the logger
func NewWithOutput ¶
NewWithOutput instantiates a new logger with a given output writer and log prefix
func (Logm) Log ¶
Log logs a message with given log level. Loglevel should be one of the Lvl* constants from this package.
Click to show internal directories.
Click to hide internal directories.
