Documentation
¶
Index ¶
- func BeginimeRecord() time.Time
- func ByConfig(title string, logMsg string, uid string)
- func ByDataCenterInfo(title string, logMsg string, uid string)
- func ByError(title string, logMsg string, uid string)
- func ByHighError(title string, logMsg string, uid string)
- func ByInfo(title string, logMsg string, uid string)
- func ByRestCatchErr(title string, logMsg string, uid string)
- func ByTimeOut(title string, logMsg string, uid string, sqlScriptOrFnName string)
- func EndTimeRecord(userID string, countType string, beginExecTime time.Time, ...)
- func GetIP() string
- func SendLog(title, logMsg, ip, uid, logType, filePath string, line int) error
- type LogBaseInfo
- type LogModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeginimeRecord ¶
程序开始执行前调用本方法,会返回开始时间,程序执行完后再调用 execEnd ,execEnd方法会自动判定是否超时
func ByDataCenterInfo ¶
ByDataCenterInfo 数据平台日志
func ByHighError ¶
ByHighError用于记录所有严重错误日志(例:系统异常)
func ByRestCatchErr ¶
ByConfig 所有后台配置操作一律要记录日志
Types ¶
type LogBaseInfo ¶
type LogBaseInfo struct { Id int64 Title string `xorm:"Title" json:"title"` LogMsg string `xorm:"LogMsg" json:"logMsg"` Uid string `xorm:"Uid" json:"uid"` IP string `xorm:"Ip" json:"ip"` FileName string `xorm:"Filename" json:"fileName"` FileLine int `xorm:"fileline" json:"fileline"` Extend1 string `xorm:"Extend1" json:"extend1"` Extend2 string `xorm:"Extend2" json:"extend2"` CreatedAt int64 `xorm:"CreatedAt" json:"createdAt"` LogTime string `xorm:"logtime" json:"logtime"` LogType string `xorm:"LogType" json:"logType"` }
Click to show internal directories.
Click to hide internal directories.