package main
import (
logrus "github.com/sirupsen/logrus"
"github.com/dragon3/logrus-typetalk-hook"
)
func main() {
logrus.AddHook(&typetalk.TypetalkHook{
BotURL: "https://typetalk.com/api/v1/topics/000?typetalkToken=abcdefghijklmnopqrstuvwxyz",
AcceptedLevels: typetalk.LevelThreshold(logrus.DebugLevel),
})
logrus.Warn("warn")
logrus.Info("info")
logrus.Debug("debug")
}
BotURL
: You can add a Bot from "Edit topic" and get BotURL from "Get or post messages URL" ( see: https://nulab-inc.com/blog/typetalk/typetalk-update-create-bots-easily-use-webhook/ )
go get github.com/dragon3/logrus-typetalk-hook
Based on hipchat handler by nuboLAB and slack handler by John Dyer