Documentation ¶
Index ¶
- Variables
- func Value(ctx context.Context, value interface{}) interface{}
- type Helper
- func (h *Helper) Debug(a ...interface{})
- func (h *Helper) Debugf(format string, a ...interface{})
- func (h *Helper) Debugw(keyvals ...interface{})
- func (h *Helper) Error(a ...interface{})
- func (h *Helper) Errorf(format string, a ...interface{})
- func (h *Helper) Errorw(keyvals ...interface{})
- func (h *Helper) Info(a ...interface{})
- func (h *Helper) Infof(format string, a ...interface{})
- func (h *Helper) Infow(keyvals ...interface{})
- func (h *Helper) Log(lever Lever, kvs ...interface{})
- func (h *Helper) Warn(a ...interface{})
- func (h *Helper) Warnf(format string, a ...interface{})
- func (h *Helper) Warnw(keyvals ...interface{})
- func (h *Helper) WithContext(ctx context.Context) *Helper
- type Lever
- type Logger
- type Valuer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultCaller is a Valuer that returns the file and line. DefaultCaller = Caller(3) // DefaultTimestamp is a Valuer that returns the current wallclock time. DefaultTimestamp = Timestamp(time.RFC3339) )
Functions ¶
Types ¶
type Logger ¶
Logger 操作日志对外的接口 实现该接口需要保证它是并发安全的
var DefaultLogger Logger = NewStdLogger(log.Writer())
DefaultLogger is default logger.
Click to show internal directories.
Click to hide internal directories.