FloatTech/ZeroBot-Plugin

[Feat] 在所有出错的地方打印error日志

Open

#1,062 opened on Nov 10, 2024

 (2 comments) (0 reactions) (0 assignees)Go (1,978 forks)auto 404
enhancementhelp wanted

Repository metrics

Stars
 (2,651 stars)
PR merge metrics
 (PR metrics pending)

Description

很多插件的处理方式为

if err != nil {
	ctx.SendChain(message.Text("ERROR: ", err))
	return
}

在没有堆栈信息的时候不好调试错误,希望改为如下形式

if err != nil {
	log.Error("<插件名称>",err)
        ctx.SendChain(message.Text("ERROR: ", err))
	return
}

Contributor guide