Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// MaxStackTrace 记录的错误信息的调用栈最大深度
MaxStackTrace = 10
)
Functions ¶
func NewFormatter ¶
NewFormatter 获得日志规范对应的格式化对象
Types ¶
type LogsV1 ¶
type LogsV1 struct { Schema string `json:"schema"` Time string `json:"t"` Level string `json:"l"` Service string `json:"s"` Channel string `json:"c"` ID string `json:"i"` Environment string `json:"e"` User string `json:"u"` Message string `json:"m"` Context map[string]interface{} `json:"ctx"` Err string `json:"err"` Request *RequestData `json:"request,omitempty"` }
LogsV1 logs.v1 日志输出内容
type LogsV1Formatter ¶
type LogsV1Formatter struct { // 时间格式,默认ISO8601,精确到秒 TimeLayout string Service string Environment string }
LogsV1Formatter 日志格式化
Click to show internal directories.
Click to hide internal directories.