Skip to content

Latest commit

 

History

History
17 lines (16 loc) · 391 Bytes

README.md

File metadata and controls

17 lines (16 loc) · 391 Bytes

dingrus

钉钉机器人的 logrus Hook.

Useage

func main() {
	dh, _ := NewDingHook("https://oapi.dingtalk.com/robot/send?access_token=xxxxxx", nil)
	logrus.AddHook(dh)
	logrus.WithFields(logrus.Fields{
		"msgtype": "markdown",
		"markdown": map[string]string{
			"title": "dingrus 测试",
			"text": "# Hello World",
		},
	}).Warn()
}