Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LevelLogger ¶
type LevelLogger struct {
// contains filtered or unexported fields
}
LevelLogger is a logger that supports log levels.
func (*LevelLogger) Debugf ¶
func (l *LevelLogger) Debugf(format string, v ...interface{})
func (*LevelLogger) Errorf ¶
func (l *LevelLogger) Errorf(format string, v ...interface{})
func (*LevelLogger) Infof ¶
func (l *LevelLogger) Infof(format string, v ...interface{})
func (*LevelLogger) Warnf ¶
func (l *LevelLogger) Warnf(format string, v ...interface{})
type Logger ¶
type Logger interface { Errorf(format string, v ...interface{}) Warnf(format string, v ...interface{}) Infof(format string, v ...interface{}) Debugf(format string, v ...interface{}) }
Logger is common logging interface.
func New ¶
func New(lvl Level, out OutputFunc) Logger
New creates a new leveled logger instance with the given parameters.
If out is nil it uses the standard logger for output.
func NewFromString ¶ added in v0.6.2
NewFromString creates a logger with s severity parsed from string.
If s is empty or invalid it defaults to WARN.
Click to show internal directories.
Click to hide internal directories.