Documentation ¶
Index ¶
- func Debug(v ...interface{})
- func Email(sleep int, sleepkey, flagId, text string)
- func Error(v ...interface{})
- func Fatal(v ...interface{})
- func FatalSendEmail(sleep int, sleepkey, flagId, text string, options ...string)
- func Info(v ...interface{})
- func InitServer(name, url string, options ...map[string]string)
- func Notice(flagId string, text string)
- func Output(level string, flagId string, calldeep int, isPrint bool, text string, ...)
- func ReportCustom(level string, flagId string, calldeep int, v ...interface{})
- func Warning(v ...interface{})
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Email ¶
// 调用Email将会立即邮件提醒, // sleep>0 同样的邮件(sleepkey相同)发送过将不会再次发送 // flagId 可能是某个文章id 、句子id、视频id等任何发生异常的数据id方便定位
func FatalSendEmail ¶
// 调用Email将会立即邮件提醒, // sleep>0 同样的邮件(sleepkey相同)发送过将不会再次发送 // flagId 可能是某个文章id 、句子id、视频id等任何发生异常的数据id方便定位,发送邮件时候为标题后缀 // options 第1个参数为自定义接收邮件通知的地址,格式为逗号分割的邮件地址,如:1@qq.com,2@qq.com
func Output ¶
func Output(level string, flagId string, calldeep int, isPrint bool, text string, options ...map[string]interface{})
自定义Output 直接调用 calldeep=1
func ReportCustom ¶
自定义报告,服务端自动忽略level白名单外的接口反馈,除非在服务端存在匹配的自定义处理器
Types ¶
type Message ¶
type Message struct { Timestamp int64 `json:"timestamp"` //时间戳,精确到纳秒 时间戳*10^9 Datetime string `json:"datetime"` //日期 Levelname string `json:"levelname"` //等级 Filename string `json:"filename"` //文件名 Lineno int `json:"lineno"` //行号 Thread int `json:"thread"` //线程号 Text string `json:"text"` //内容 Type int `json:"type"` //类型 Weights int `json:"weights"` //权重 FlagId string `json:"flagid"` //标记id Name string `json:"name"` //程序名 HostName string `json:"hostname"` //host name RemoteIP string `json:"remoteip"` //remote ip Handler string `json:"handler"` //处理器 用于自定义处理器 Options map[string]interface{} `json:"options"` //额外参数 }
Click to show internal directories.
Click to hide internal directories.