Documentation ¶ Index ¶ func NewLogger(cf ...*Options) type Logger func GetLogger() (ret *Logger) func (l *Logger) GetLevel() (level zapcore.Level) type Options Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func NewLogger ¶ func NewLogger(cf ...*Options) Types ¶ type Logger ¶ type Logger struct { *zap.Logger sync.RWMutex Opts *Options // contains filtered or unexported fields } func GetLogger ¶ func GetLogger() (ret *Logger) GetLogger returns logger func (*Logger) GetLevel ¶ func (l *Logger) GetLevel() (level zapcore.Level) type Options ¶ type Options struct { LogFileDir string AppName string MaxSize int //文件多大开始切分 MaxBackups int //保留文件个数 MaxAge int //文件保留最大实际 Level string } Source Files ¶ View all Source files zap.go Click to show internal directories. Click to hide internal directories.