另客网go项目公用的代码库
whao 53bfc3c2e4 add readme 5 gadus atpakaļ
..
hooks debug info 5 gadus atpakaļ
vendor add log hooks 5 gadus atpakaļ
README.md add readme 5 gadus atpakaļ
go.mod add log hooks 5 gadus atpakaļ
go.sum add log hooks 5 gadus atpakaļ
log.go add log module 5 gadus atpakaļ
logger.go debug info 5 gadus atpakaļ
logger_test.go debug info 5 gadus atpakaļ

README.md

desc

目前支持 [error], [fatal], [panic]三类错误的hook邮件通知

install

go get git.links123.net/links123.com/pkg/log

demo

err := log.NewDefaultLogger(&hooks.Project{
		Name:   "forum",
		Domain: "http://api.links123.net/forum",
	})
if err != nil {
    panic(err)
}

log.Debug("this a debug info")
log.Error("this a err info")
log.Fatal("this a fatal info")