Documentation
¶
Index ¶
- Constants
- Variables
- func CanBeLogLevel(level int) bool
- func LogLevelName(level LogLevel) string
- func ValidLogLevel(level LogLevel) bool
- func ValidLogLevelName(level string) bool
- type LogLevel
- type Logger
- func (self *Logger) Debug(message string, args ...interface{})
- func (self *Logger) Error(message string, args ...interface{})
- func (self *Logger) Fatal(message string, args ...interface{})
- func (self *Logger) Flags() int
- func (self *Logger) Info(message string, args ...interface{})
- func (self *Logger) Log(level LogLevel, message string, args ...interface{})
- func (self *Logger) Prefix() string
- func (self *Logger) Say(message string, args ...interface{})
- func (self *Logger) SetFlags(flags int) *Logger
- func (self *Logger) SetLevel(level LogLevel)
- func (self *Logger) SetOutput(writer io.Writer) *Logger
- func (self *Logger) SetPrefix(prefix string) *Logger
- func (self *Logger) UseColor(color aurora.Aurora)
- func (self *Logger) UsePanic(use bool)
- func (self *Logger) Warn(message string, args ...interface{})
- func (self *Logger) Warning(message string, args ...interface{})
Constants ¶
Variables ¶
View Source
var LogLevelColors = map[LogLevel]aurora.Color{ FATAL: aurora.WhiteFg | aurora.BrightFg | aurora.RedBg, ERROR: aurora.RedFg | aurora.BrightFg, WARNING: aurora.YellowFg | aurora.BrightFg, INFO: aurora.CyanFg | aurora.BrightFg, DEBUG: aurora.GreenFg, NOTE: aurora.BrownFg, }
View Source
var LogLevelNames = map[LogLevel]string{ FATAL: "FATAL", ERROR: "ERROR", WARNING: "WARNING", INFO: "INFO", DEBUG: "DEBUG", }
View Source
var LogLevelValues = map[string]LogLevel{ "FATAL": FATAL, "ERROR": ERROR, "WARNING": WARNING, "INFO": INFO, "DEBUG": DEBUG, "WARN": WARNING, "CRITICAL": FATAL, "CRIT": FATAL, "CRYTICAL": FATAL, "CRYT": FATAL, }
View Source
var Root = NewAutoColorLogger(INFO)
Functions ¶
func CanBeLogLevel ¶
func LogLevelName ¶
func ValidLogLevel ¶
func ValidLogLevelName ¶
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewAutoColorLogger ¶
func NewColorLogger ¶
Click to show internal directories.
Click to hide internal directories.