Documentation ¶
Index ¶
- Constants
- func ColorFormat(msg *logMsg) string
- func Flush()
- func GetLogLevel() int
- func GetLogLevelName() string
- func LogToFile(filename string) bool
- func Printf(level int, format string, v ...interface{})
- func Println(level int, line string)
- func Rotate()
- func SetLogLevel(lvl int)
- func SetLogLevelFromName(name string)
- func SimpleFormat(msg *logMsg) string
- type Formatter
Constants ¶
View Source
const ( // CRITICAL errors CRITICAL = iota // SEVERE errors SEVERE // ERROR message ERROR // WARN for warning messages WARN // INFO is for informational messages INFO // DBG for debug messages DBG // ROTATE log file command ROTATE = iota // rotate log file // FLUSH log (make sure all messages are processed) FLUSH )
Variables ¶
This section is empty.
Functions ¶
func ColorFormat ¶ added in v1.2.1
func ColorFormat(msg *logMsg) string
ColorFormat uses colors for different log levels
func GetLogLevelName ¶
func GetLogLevelName() string
GetLogLevelName returns the current loglevel in human-readable form.
func SetLogLevelFromName ¶
func SetLogLevelFromName(name string)
SetLogLevelFromName sets the logging level from symbolic name.
func SimpleFormat ¶ added in v1.2.1
func SimpleFormat(msg *logMsg) string
SimpleFormat creates a plain format for log messages
Types ¶
Click to show internal directories.
Click to hide internal directories.