Documentation ¶
Index ¶
- func DebugEnabled() bool
- func Debugf(format string, args ...interface{})
- func ErrorEnabled() bool
- func Errorf(format string, args ...interface{})
- func InfoEnabled() bool
- func Infof(format string, args ...interface{})
- func WarnEnabled() bool
- func Warnf(format string, args ...interface{})
- type Level
- type LevelWrapper
- func (d *LevelWrapper) DebugEnabled() bool
- func (d *LevelWrapper) Debugf(format string, args ...interface{})
- func (d *LevelWrapper) ErrorEnabled() bool
- func (d *LevelWrapper) Errorf(format string, args ...interface{})
- func (d *LevelWrapper) InfoEnabled() bool
- func (d *LevelWrapper) Infof(format string, args ...interface{})
- func (d *LevelWrapper) Level() Level
- func (d *LevelWrapper) SetLevel(level Level)
- func (d *LevelWrapper) WarnEnabled() bool
- func (d *LevelWrapper) Warnf(format string, args ...interface{})
- type Logger
- type LoggerWithLevel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugEnabled ¶
func DebugEnabled() bool
DebugEnabled returns whether output of messages at the debug level is currently enabled.
func Debugf ¶
func Debugf(format string, args ...interface{})
Debugf logs potentially verbose debug-time data
func ErrorEnabled ¶
func ErrorEnabled() bool
ErrorEnabled returns whether output of messages at the info level is currently enabled.
func InfoEnabled ¶
func InfoEnabled() bool
InfoEnabled returns whether output of messages at the info level is currently enabled.
func WarnEnabled ¶
func WarnEnabled() bool
WarnEnabled returns whether output of messages at the info level is currently enabled.
Types ¶
type Level ¶
type Level int
Level is a level of logging
func ParseLevel ¶
ParseLevel parses the log level, returns Info level if not found
func (Level) DebugEnabled ¶
DebugEnabled returns whether output of messages at the debug level is currently enabled.
func (Level) ErrorEnabled ¶
ErrorEnabled returns whether output of messages at the error level is currently enabled.
func (Level) InfoEnabled ¶
InfoEnabled returns whether output of messages at the info level is currently enabled.
func (Level) WarnEnabled ¶
WarnEnabled returns whether output of messages at the warn level is currently enabled.
type LevelWrapper ¶
LevelWrapper is a logger adapter
func (*LevelWrapper) DebugEnabled ¶
func (d *LevelWrapper) DebugEnabled() bool
DebugEnabled returns whether output of messages at the debug level is currently enabled.
func (*LevelWrapper) Debugf ¶
func (d *LevelWrapper) Debugf(format string, args ...interface{})
Debugf logs potentially verbose debug-time data
func (*LevelWrapper) ErrorEnabled ¶
func (d *LevelWrapper) ErrorEnabled() bool
ErrorEnabled returns whether output of messages at the wanr level is currently enabled.
func (*LevelWrapper) Errorf ¶
func (d *LevelWrapper) Errorf(format string, args ...interface{})
Errorf logs error conditions.
func (*LevelWrapper) InfoEnabled ¶
func (d *LevelWrapper) InfoEnabled() bool
InfoEnabled returns whether output of messages at the info level is currently enabled.
func (*LevelWrapper) Infof ¶
func (d *LevelWrapper) Infof(format string, args ...interface{})
Infof logs standard log data
func (*LevelWrapper) SetLevel ¶
func (d *LevelWrapper) SetLevel(level Level)
SetLevel sets the output level.
func (*LevelWrapper) WarnEnabled ¶
func (d *LevelWrapper) WarnEnabled() bool
WarnEnabled returns whether output of messages at the warn level is currently enabled.
func (*LevelWrapper) Warnf ¶
func (d *LevelWrapper) Warnf(format string, args ...interface{})
Warnf logs suspect situations and recoverable errors
type Logger ¶
type Logger interface { // Debugf logs potentially verbose debug-time data Debugf(format string, args ...interface{}) // Infof logs informational data Infof(format string, args ...interface{}) // Warnf logs suspect situations and recoverable errors Warnf(format string, args ...interface{}) // Errorf logs error conditions. Errorf(format string, args ...interface{}) }
Logger is a logging interface
type LoggerWithLevel ¶
type LoggerWithLevel interface { Logger // Level gets the current logging level Level() Level // SetLevel set the current logging level SetLevel(level Level) // DebugEnabled returns whether output of messages at the debug level is currently enabled. DebugEnabled() bool // InfoEnabled returns whether output of messages at the info level is currently enabled. InfoEnabled() bool // WarnEnabled returns whether output of messages at the warn level is currently enabled. WarnEnabled() bool // ErrorEnabled returns whether output of messages at the error level is currently enabled. ErrorEnabled() bool }
LoggerWithLevel is a logger with level funcs
var Log LoggerWithLevel
Log is the global logger