Added request logging
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
parent
aab4a6678d
commit
fe5425ca50
2
main.go
2
main.go
@ -6,6 +6,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
|
"github.com/gofiber/fiber/v2/middleware/logger"
|
||||||
"maunium.net/go/mautrix"
|
"maunium.net/go/mautrix"
|
||||||
"maunium.net/go/mautrix/id"
|
"maunium.net/go/mautrix/id"
|
||||||
)
|
)
|
||||||
@ -51,6 +52,7 @@ func init() {
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
app := fiber.New()
|
app := fiber.New()
|
||||||
|
app.Use(logger.New())
|
||||||
app.Post("/", HandlePayloadPost)
|
app.Post("/", HandlePayloadPost)
|
||||||
app.Post("/alertmanager", HandleAlertmanagerPayloadPost)
|
app.Post("/alertmanager", HandleAlertmanagerPayloadPost)
|
||||||
app.Listen(fmt.Sprintf(":%s", port))
|
app.Listen(fmt.Sprintf(":%s", port))
|
||||||
|
Loading…
Reference in New Issue
Block a user