Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultTimeLayout = "2006-01-02 15:04:05.000"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JsonFormatter ¶
type JsonFormatter struct {
// contains filtered or unexported fields
}
func Json ¶
func Json() *JsonFormatter
func (*JsonFormatter) Format ¶
func (formatter *JsonFormatter) Format(log *logis.Log) ([]byte, error)
序列化日志
func (*JsonFormatter) TimeLayout ¶
func (formatter *JsonFormatter) TimeLayout(layout string) *JsonFormatter
设置时间序列化规则
type TextFormatter ¶
type TextFormatter struct {
// contains filtered or unexported fields
}
func Text ¶
func Text() *TextFormatter
func (*TextFormatter) LevelLayout ¶
func (f *TextFormatter) LevelLayout(strings map[logis.Level]string) *TextFormatter
设置消息等级文本
func (*TextFormatter) TimeLayout ¶
func (f *TextFormatter) TimeLayout(layout string) *TextFormatter
设置时间序列化规则
Click to show internal directories.
Click to hide internal directories.