Skip to content

Commit

Permalink
Update logging routes in services
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alphayax committed Dec 1, 2023
1 parent 88f1e20 commit 92f8666
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion article-service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func loadApiServer() {
}))

Router.Use(
gin.LoggerWithWriter(gin.DefaultWriter, "/healthz"),
gin.LoggerWithWriter(gin.DefaultWriter, "/", "/healthz"),
gin.Recovery(),
)

Expand Down
2 changes: 1 addition & 1 deletion cart-service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func loadApiServer() {
}))

Router.Use(
gin.LoggerWithWriter(gin.DefaultWriter, "/healthz"),
gin.LoggerWithWriter(gin.DefaultWriter, "/", "/healthz"),
gin.Recovery(),
)

Expand Down

0 comments on commit 92f8666

Please sign in to comment.