Documentation ¶
Index ¶
- func Blue(content interface{}) string
- func Bold(content interface{}) string
- func Green(content interface{}) string
- func Magenta(content interface{}) string
- func Red(content interface{}) string
- func Reverse(content interface{}) string
- func Yellow(content interface{}) string
- type ConsoleLogger
- func (l *ConsoleLogger) Debugf(format string, args ...interface{})
- func (l *ConsoleLogger) Error(err error)
- func (l *ConsoleLogger) Errorf(format string, args ...interface{})
- func (l *ConsoleLogger) Infof(format string, args ...interface{})
- func (l *ConsoleLogger) SetLevel(level Level)
- func (l *ConsoleLogger) Warnf(format string, args ...interface{})
- func (l *ConsoleLogger) Write(p []byte) (int, error)
- type Level
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConsoleLogger ¶
type ConsoleLogger struct {
// contains filtered or unexported fields
}
ConsoleLogger output messages to console
func NewConsoleLogger ¶
func NewConsoleLogger() *ConsoleLogger
NewConsoleLogger creates a new ConsoleLogger
func (*ConsoleLogger) Debugf ¶
func (l *ConsoleLogger) Debugf(format string, args ...interface{})
Debugf logs a DEBUG message
func (*ConsoleLogger) Errorf ¶
func (l *ConsoleLogger) Errorf(format string, args ...interface{})
Errorf logs a ERROR message
func (*ConsoleLogger) Infof ¶
func (l *ConsoleLogger) Infof(format string, args ...interface{})
Infof logs a INFO message
func (*ConsoleLogger) SetLevel ¶
func (l *ConsoleLogger) SetLevel(level Level)
SetLevel increases/decreases current log level
func (*ConsoleLogger) Warnf ¶
func (l *ConsoleLogger) Warnf(format string, args ...interface{})
Warnf logs a WARN message
type Logger ¶
type Logger interface { SetLevel(level Level) Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Warnf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Error(err error) Write(p []byte) (int, error) }
Logger defines the logging interface.
Click to show internal directories.
Click to hide internal directories.