R

package
v0.0.0-...-dcafb52 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(v ...interface{})

func Email

func Email(sleep int, sleepkey, flagId, text string)

// 调用Email将会立即邮件提醒, // sleep>0 同样的邮件(sleepkey相同)发送过将不会再次发送 // flagId 可能是某个文章id 、句子id、视频id等任何发生异常的数据id方便定位

func Error

func Error(v ...interface{})

func Fatal

func Fatal(v ...interface{})

func FatalSendEmail

func FatalSendEmail(sleep int, sleepkey, flagId, text string, options ...string)

// 调用Email将会立即邮件提醒, // sleep>0 同样的邮件(sleepkey相同)发送过将不会再次发送 // flagId 可能是某个文章id 、句子id、视频id等任何发生异常的数据id方便定位,发送邮件时候为标题后缀 // options 第1个参数为自定义接收邮件通知的地址,格式为逗号分割的邮件地址,如:1@qq.com,2@qq.com

func Info

func Info(v ...interface{})

func InitServer

func InitServer(name, url string, options ...map[string]string)

初始化服务

func Notice

func Notice(flagId string, text string)

flagId 长度不超过32

func Output

func Output(level string, flagId string, calldeep int, isPrint bool, text string, options ...map[string]interface{})

自定义Output 直接调用 calldeep=1

func ReportCustom

func ReportCustom(level string, flagId string, calldeep int, v ...interface{})

自定义报告,服务端自动忽略level白名单外的接口反馈,除非在服务端存在匹配的自定义处理器

func Warning

func Warning(v ...interface{})

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"`   //额外参数
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL