From 481f62fb6ccca1ece4a99cbba98b8e44c77c743c Mon Sep 17 00:00:00 2001 From: Timo Volkmann Date: Mon, 11 Jan 2021 00:00:00 +0100 Subject: [PATCH] added http logger --- web/http.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/http.go b/web/http.go index f4b2226..cd4f54c 100644 --- a/web/http.go +++ b/web/http.go @@ -4,6 +4,7 @@ import ( "errors" "git.timovolkmann.de/gyrogpsc/core" "github.com/gofiber/fiber/v2" + "github.com/gofiber/fiber/v2/middleware/logger" "github.com/gofiber/template/html" "github.com/gofiber/websocket/v2" "github.com/google/uuid" @@ -14,7 +15,8 @@ func CreateServer(s *core.TrackingService, sub core.Subscriber, c *core.Configur app := fiber.New(fiber.Config{ Views: fiberTemplateEngine(c), }) - app.Static("/static", "static") + app.Use(logger.New()) + app.Static("/static", "./static") // Application Main Page app.Get("/", fiberHomeHandler)