From d24c19963f8d0d17d6db93b418cc9d644693c868 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 28 Jul 2024 16:01:40 +0900 Subject: feat(backend): user Logger and Recover middleware --- backend/main.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'backend') diff --git a/backend/main.go b/backend/main.go index 1ea1fd1..1787e3c 100644 --- a/backend/main.go +++ b/backend/main.go @@ -10,6 +10,7 @@ import ( "github.com/jackc/pgx/v5" "github.com/labstack/echo/v4" + "github.com/labstack/echo/v4/middleware" oapimiddleware "github.com/oapi-codegen/echo-middleware" "github.com/nsfisis/iosdc-2024-albatross-backend/api" @@ -144,6 +145,9 @@ func main() { e := echo.New() + e.Use(middleware.Logger()) + e.Use(middleware.Recover()) + { apiGroup := e.Group("/api") apiGroup.Use(oapimiddleware.OapiRequestValidator(openApiSpec)) -- cgit v1.2.3-70-g09d2