Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultEncoderConfig ¶
func DefaultEncoderConfig() zapcore.EncoderConfig
func DefaultLumberjackLogger ¶
func DefaultLumberjackLogger() *lumberjack.Logger
1.不会自动清理backup 2.每200mb压缩一次,不按时间rotate
func DefaultOption ¶
Types ¶
type Plugin ¶
func NewFilePlugin ¶
Lumberjack logger虽然持有File但没有暴露sync方法,所以没办法利用zap的sync特性 所以额外返回一个closer,需要保证在进程退出前close以保证写入的内容可以全部刷到到磁盘
func NewPlugin ¶
func NewPlugin(writer zapcore.WriteSyncer, enabler zapcore.LevelEnabler) Plugin
func NewStderrPlugin ¶
func NewStderrPlugin(enabler zapcore.LevelEnabler) Plugin
func NewStdoutPlugin ¶
func NewStdoutPlugin(enabler zapcore.LevelEnabler) Plugin
Click to show internal directories.
Click to hide internal directories.