Documentation
¶
Index ¶
- Variables
- func Debug(args ...interface{})
- func Debugw(msg string, keysAndValues ...interface{})
- func Error(args ...interface{})
- func Errorw(msg string, keysAndValues ...interface{})
- func Fatal(args ...interface{})
- func Fatalw(msg string, keysAndValues ...interface{})
- func GetLevel() zapcore.Level
- func GetLogger() *zap.SugaredLogger
- func Info(args ...interface{})
- func Infow(msg string, keysAndValues ...interface{})
- func Init(conf *Conf) error
- func MustInit(conf *Conf)
- func NewLog(conf *Conf) (*zap.Logger, error)
- func Sync() error
- func Warn(args ...interface{})
- func Warnw(msg string, keysAndValues ...interface{})
- type Conf
- type Logger
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(ProvideLogger)
ProviderSet is the Wire provider set for the log package.
Functions ¶
Types ¶
type Conf ¶
type Conf struct {
Output string
Path string
Filename string // 日志文件名,为空时使用默认值
Level string
KeepHours int // 日志保留天数(改为导出)
RotateSize int // 单个日志文件最大大小(MB)
RotateNum int // 保留的日志文件数量
KafkaBrokers string
KafkaTopic string
}
Conf holds Conf configuration options.
type Logger ¶
type Logger struct {
Log *zap.SugaredLogger
}
Click to show internal directories.
Click to hide internal directories.