added log webhook support

This commit is contained in:
2024-03-17 12:07:17 +01:00
parent e0badcb7a2
commit cc745d177d
5 changed files with 96 additions and 4 deletions

View File

@@ -15,6 +15,7 @@ import (
"github.com/joho/godotenv"
_ "github.com/lib/pq"
"github.com/sirupsen/logrus"
"github.com/vaporvee/acecore/log2webhook"
)
//TODO: add more error handlings
@@ -79,6 +80,6 @@ func logrusInitFile() {
return
}
mw := io.MultiWriter(os.Stdout, log)
mw := io.MultiWriter(os.Stdout, log, &log2webhook.WebhookWriter{})
logrus.SetOutput(mw)
}