Documentation ¶
Overview ¶
日志记录模块
Index ¶
- func Alert(msg string, err error)
- func AlertError(msg string, err error) error
- func Crit(msg string, err error)
- func CritError(msg string, err error) error
- func Debug(msg string, err error)
- func DebugError(msg string, err error) error
- func Error(msg string, err error)
- func ErrorError(msg string, err error) error
- func Info(msg string, err error)
- func InfoError(msg string, err error) error
- func Notice(msg string)
- func NoticeError(msg string) error
- func Panic(msg string, err error)
- func PanicError(msg string, err error) error
- func Regedit(c *Config)
- func SaveAny(inf byte, file string, line uint, msg string, err error)
- func SaveAnyError(inf byte, file string, line uint, msg string, err error) error
- func User(uid uint, typ, info string)
- func Warning(msg string, err error)
- func WarningError(msg string, err error) error
- type Config
- type LogStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveAny ¶ added in v0.0.17
记录日志信息[对外函数,用于记录任意类型/等级的日志信息]
inf 日志等级 file 错误文件 line 错误行号 msg 消息备注 err 错误详情
func SaveAnyError ¶ added in v0.1.1
记录日志信息[对外函数,用于记录任意类型/等级的日志信息]
inf 日志等级 file 错误文件 line 错误行号 msg 消息备注 err 错误详情
Types ¶
type LogStruct ¶ added in v0.0.16
type LogStruct struct { Id uint64 `gorm:"column:id;primaryKey;type:BIGINT UNSIGNED;not null;autoIncrement" json:"id" form:"id"` // 条目ID Type string `gorm:"column:type;type:CHAR(1);comment:错误类型;index:error_type" json:"type" form:"type"` //错误类型,如:I、D等 File string `gorm:"column:file;type:VARCHAR(200);comment:错误文件" json:"file" form:"file"` //错误文件 Line uint `gorm:"column:line;type:INT UNSIGNED;comment:文件行数" json:"line" form:"line"` //错误行数 Msg string `gorm:"column:msg;type:VARCHAR(200);comment:消息概述" json:"msg" form:"msg"` //错误消息概述 Content string `gorm:"column:content;type:TEXT;comment:错误消息内容" json:"content" form:"content"` //错误信息内容 CreatedAt string `gorm:"column:created_at;type:DATETIME;comment:创建时间" json:"created_at" form:"created_at"` //错误发生时间 }
错误信息统计表
Click to show internal directories.
Click to hide internal directories.