Documentation
¶
Overview ¶
Package logx 是 zap 的薄包装:业务代码只允许经本包取日志,禁止直接 import zap。
Index ¶
- type Field
- type Logger
- func (l *Logger) Debug(msg string, fields ...Field)
- func (l *Logger) DebugEnabled() bool
- func (l *Logger) Error(msg string, fields ...Field)
- func (l *Logger) Info(msg string, fields ...Field)
- func (l *Logger) Sync() error
- func (l *Logger) Warn(msg string, fields ...Field)
- func (l *Logger) With(fields ...Field) *Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) DebugEnabled ¶
DebugEnabled level=debug 是否生效(accessLog 等 Debug 字段构造的 level 守卫 ——zap 的字段编码短路在调用内,字段切片已在调用点物化逃逸;热路径先判再 构造,level 恒定无双读风险)。zapcore 不泄露(内部判定)。
Click to show internal directories.
Click to hide internal directories.