From 92f8666cbd44575c26765a988ae5a74391277ae3 Mon Sep 17 00:00:00 2001 From: alphayax Date: Fri, 1 Dec 2023 11:28:22 +0100 Subject: [PATCH] Update logging routes in services The commit updates the routes logged by the gin.DefaultWriter in the article-service and the cart-service. Previously, logs were generated for all routes except for the "/healthz" route. Now, logs will be generated for all routes except both the root ("/") and the "/healthz" routes. --- article-service/main.go | 2 +- cart-service/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/article-service/main.go b/article-service/main.go index f0d08d1..b817071 100644 --- a/article-service/main.go +++ b/article-service/main.go @@ -59,7 +59,7 @@ func loadApiServer() { })) Router.Use( - gin.LoggerWithWriter(gin.DefaultWriter, "/healthz"), + gin.LoggerWithWriter(gin.DefaultWriter, "/", "/healthz"), gin.Recovery(), ) diff --git a/cart-service/main.go b/cart-service/main.go index 68162d9..4f00452 100644 --- a/cart-service/main.go +++ b/cart-service/main.go @@ -59,7 +59,7 @@ func loadApiServer() { })) Router.Use( - gin.LoggerWithWriter(gin.DefaultWriter, "/healthz"), + gin.LoggerWithWriter(gin.DefaultWriter, "/", "/healthz"), gin.Recovery(), )