[PR #678] [MERGED] fix: remove duplicate request logging #669

Open
opened 2025-10-07 00:20:20 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pocket-id/pocket-id/pull/678
Author: @ryankask
Created: 6/24/2025
Status: Merged
Merged: 6/24/2025
Merged by: @kmendell

Base: mainHead: fix/remove-double-logging


📝 Commits (1)

  • ac1e90c fix: remove duplicate request logging

📊 Changes

1 file changed (+0 additions, -1 deletions)

View changed files

📝 backend/internal/bootstrap/router_bootstrap.go (+0 -1)

📄 Description

Gin's default engine constructor already adds the logger by default: https://github.com/gin-gonic/gin/blob/v1.10.0/gin.go#L224


I noticed requests being logged twice in the logs and found some related issues in the Gin repo. This may be related to #294 where the user noticed excessive logging.

Before:

❯ xh http://localhost:1411/healthz
HTTP/1.1 204 No Content
Date: Tue, 24 Jun 2025 07:46:20 GMT

[GIN] 2025/06/24 - 08:46:20 | 204 |         917ns |       127.0.0.1 | GET      "/healthz"
[GIN] 2025/06/24 - 08:46:20 | 204 |      33.791µs |       127.0.0.1 | GET      "/healthz"

After:

❯ xh http://localhost:1411/healthz
HTTP/1.1 204 No Content
Date: Tue, 24 Jun 2025 07:47:19 GMT

[GIN] 2025/06/24 - 08:47:19 | 204 |      14.958µs |       127.0.0.1 | GET      "/healthz"

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/pocket-id/pocket-id/pull/678 **Author:** [@ryankask](https://github.com/ryankask) **Created:** 6/24/2025 **Status:** ✅ Merged **Merged:** 6/24/2025 **Merged by:** [@kmendell](https://github.com/kmendell) **Base:** `main` ← **Head:** `fix/remove-double-logging` --- ### 📝 Commits (1) - [`ac1e90c`](https://github.com/pocket-id/pocket-id/commit/ac1e90c2623ad370a1e562d9186097af843a17f9) fix: remove duplicate request logging ### 📊 Changes **1 file changed** (+0 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/internal/bootstrap/router_bootstrap.go` (+0 -1) </details> ### 📄 Description Gin's default engine constructor already adds the logger by default: https://github.com/gin-gonic/gin/blob/v1.10.0/gin.go#L224 --- I noticed requests being logged twice in the logs and found some related issues in the Gin repo. This may be related to #294 where the user noticed excessive logging. Before: ``` ❯ xh http://localhost:1411/healthz HTTP/1.1 204 No Content Date: Tue, 24 Jun 2025 07:46:20 GMT [GIN] 2025/06/24 - 08:46:20 | 204 | 917ns | 127.0.0.1 | GET "/healthz" [GIN] 2025/06/24 - 08:46:20 | 204 | 33.791µs | 127.0.0.1 | GET "/healthz" ``` After: ``` ❯ xh http://localhost:1411/healthz HTTP/1.1 204 No Content Date: Tue, 24 Jun 2025 07:47:19 GMT [GIN] 2025/06/24 - 08:47:19 | 204 | 14.958µs | 127.0.0.1 | GET "/healthz" ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2025-10-07 00:20:20 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id#669