Documentation ¶
Index ¶
- func PathExists(path string) (bool, error)
- type FileRotateOption
- type FileRotatelogs
- type OptionFunc
- type Zap
- func (z *Zap) CustomTimeEncoder(t time.Time, encoder zapcore.PrimitiveArrayEncoder)
- func (z *Zap) GetEncoder() zapcore.Encoder
- func (z *Zap) GetEncoderConfig() zapcore.EncoderConfig
- func (z *Zap) GetEncoderCore(l zapcore.Level, level zap.LevelEnablerFunc) zapcore.Core
- func (z *Zap) GetLevelPriority(level zapcore.Level) zap.LevelEnablerFunc
- func (z *Zap) GetZapCores() []zapcore.Core
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PathExists ¶
Types ¶
type FileRotateOption ¶
type FileRotateOption struct {
// contains filtered or unexported fields
}
type FileRotatelogs ¶
type FileRotatelogs struct {
// contains filtered or unexported fields
}
func NewFileRotateLogs ¶
func NewFileRotateLogs(director string, opts ...OptionFunc) (*FileRotatelogs, error)
func (*FileRotatelogs) GetWriteSyncer ¶
func (f *FileRotatelogs) GetWriteSyncer(level string) (zapcore.WriteSyncer, error)
type OptionFunc ¶
type OptionFunc func(opt *FileRotateOption) error
func SetConsole ¶
func SetConsole(console bool) OptionFunc
func SetFileWriter ¶
func SetFileWriter(fileWriter bool) OptionFunc
func SetLevelPath ¶
func SetLevelPath(f func(level string) string) OptionFunc
func SetLogExt ¶
func SetLogExt(logExt string) OptionFunc
func SetMaxAge ¶
func SetMaxAge(maxAge time.Duration) OptionFunc
func SetPrefix ¶
func SetPrefix(prefix string) OptionFunc
type Zap ¶
type Zap struct {
// contains filtered or unexported fields
}
func NewZap ¶
func NewZap(prefix, format, stacktraceKey string, level zapcore.Level, encoder zapcore.LevelEncoder, writeSyncer func(level string) (zapcore.WriteSyncer, error)) *Zap
func (*Zap) CustomTimeEncoder ¶
func (z *Zap) CustomTimeEncoder(t time.Time, encoder zapcore.PrimitiveArrayEncoder)
func (*Zap) GetEncoder ¶
func (*Zap) GetEncoderConfig ¶
func (z *Zap) GetEncoderConfig() zapcore.EncoderConfig
func (*Zap) GetEncoderCore ¶
func (*Zap) GetLevelPriority ¶
func (z *Zap) GetLevelPriority(level zapcore.Level) zap.LevelEnablerFunc
func (*Zap) GetZapCores ¶
Click to show internal directories.
Click to hide internal directories.