Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LevelEncoder ¶
func LevelEncoder(EncodeLevel string) zapcore.LevelEncoder
LevelEncoder 根据 EncodeLevel 返回 zapcore.LevelEncoder
Types ¶
type LogFormatConfig ¶
type LogFormatConfig struct { Level zapcore.Level // 日志级别 Prefix string // 日志前缀 IsJson bool // 是否采用json格式 EncoderLevel string // 编码格式 StacktraceLevel zapcore.LevelEnabler // 打印堆栈信息的等级 }
LogFormatConfig 用于指定日志的各项格式化设置
type LogSummary ¶
type LogSummary struct { LocalFileWriter writer.LogWriter // 本地文件日志写入 KafkaWriter writer.LogWriter // 向各类消息队列发送日志信息 SysLogWriter writer.LogWriter // syslog形式的日志 LogFormatConfig *LogFormatConfig // 日志格式配置 }
func (*LogSummary) BuildWriters ¶
func (ls *LogSummary) BuildWriters() []zapcore.WriteSyncer
BuildWriters 新增符合zap要求的Writer
Click to show internal directories.
Click to hide internal directories.