Documentation ¶
Index ¶
- Constants
- func Value(v interface{}) interface{}
- type Helper
- func (h *Helper) Debug(a ...interface{})
- func (h *Helper) Debugf(format string, a ...interface{})
- func (h *Helper) Debugw(pairs ...interface{})
- func (h *Helper) Error(a ...interface{})
- func (h *Helper) Errorf(format string, a ...interface{})
- func (h *Helper) Errorw(pairs ...interface{})
- func (h *Helper) Info(a ...interface{})
- func (h *Helper) Infof(format string, a ...interface{})
- func (h *Helper) Infow(pairs ...interface{})
- func (h *Helper) Warn(a ...interface{})
- func (h *Helper) Warnf(format string, a ...interface{})
- func (h *Helper) Warnw(pairs ...interface{})
- type Level
- type Logger
- type Valuer
- type Verbose
Constants ¶
View Source
const LevelKey = "level"
LevelKey is logger level key.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
Helper is a logger helper.
func (*Helper) Debug ¶
func (h *Helper) Debug(a ...interface{})
Debug logs a message at debug level.
func (*Helper) Debugw ¶
func (h *Helper) Debugw(pairs ...interface{})
Debugw logs a message at debug level.
func (*Helper) Error ¶
func (h *Helper) Error(a ...interface{})
Error logs a message at error level.
func (*Helper) Errorw ¶
func (h *Helper) Errorw(pairs ...interface{})
Errorw logs a message at error level.
func (*Helper) Infow ¶
func (h *Helper) Infow(pairs ...interface{})
Infow logs a message at info level.
type Logger ¶
type Logger interface {
Print(pairs ...interface{})
}
Logger is a logger interface.
var ( // DefaultLogger is default logger. DefaultLogger Logger = NewStdLogger(log.Writer()) )
func NewStdLogger ¶
NewStdLogger new a std logger with options.
type Verbose ¶
type Verbose struct {
// contains filtered or unexported fields
}
Verbose is a verbose type that implements Logger Print.
func NewVerbose ¶
NewVerbose new a verbose with level.
func (Verbose) Enabled ¶
Enabled will return true if this log level is enabled, guarded by the value of v.
Click to show internal directories.
Click to hide internal directories.