Amazon EventBridge Hook for Logrus
$ go get github.com/Teddy-Schmitz/eventbridge_logrus
package main
import (
"github.com/sirupsen/logrus"
"github.com/Teddy-Schmitz/eventbridge_logrus"
)
func main() {
hook, err := logrus_eventbridge.NewEventbridgeHook("region", "source", "eventbus")
if err != nil {
panic(err)
}
logrus.AddHook(hook)
logrus.WithField("hello", "test").Errorln("an error")
}
{
"detail": {
"level": [
"info"
]
}
}
Pull requests welcome!