[PR #942] [MERGED] feat: add support for LOG_LEVEL env variable #532

Closed
opened 2025-10-07 00:18:04 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pocket-id/pocket-id/pull/942
Author: @stonith404
Created: 9/13/2025
Status: Merged
Merged: 9/14/2025
Merged by: @ItalyPaleAle

Base: mainHead: feat/log-level


📝 Commits (4)

  • c978085 feat: add support for LOG_LEVEL env variable
  • 9348abb correctly match paths
  • c75d5b0 use prefix matching instead of regex
  • 496c622 add validation and to lower for LOG_LEVEL

📊 Changes

6 files changed (+54 additions, -48 deletions)

View changed files

📝 backend/go.mod (+2 -2)
📝 backend/go.sum (+2 -2)
📝 backend/internal/bootstrap/db_bootstrap.go (+7 -6)
📝 backend/internal/bootstrap/observability_boostrap.go (+7 -14)
📝 backend/internal/bootstrap/router_bootstrap.go (+28 -24)
📝 backend/internal/common/env_config.go (+8 -0)

📄 Description

This PR adds support for the LOG_LEVEL env variable. Additionally a few improvements were made:

  • Replaced github.com/samber/slog-gin with github.com/gin-contrib/slog
  • Removed TextHandler and use tint.Handler but without color if the output isn't a terminal

Closes #294


🔄 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/942 **Author:** [@stonith404](https://github.com/stonith404) **Created:** 9/13/2025 **Status:** ✅ Merged **Merged:** 9/14/2025 **Merged by:** [@ItalyPaleAle](https://github.com/ItalyPaleAle) **Base:** `main` ← **Head:** `feat/log-level` --- ### 📝 Commits (4) - [`c978085`](https://github.com/pocket-id/pocket-id/commit/c9780859bc81dc2e20de523f2092d04898fd9cac) feat: add support for `LOG_LEVEL` env variable - [`9348abb`](https://github.com/pocket-id/pocket-id/commit/9348abb2b5bf7ea803c2c8817df2b0b80965e0ae) correctly match paths - [`c75d5b0`](https://github.com/pocket-id/pocket-id/commit/c75d5b0eda73ad987463f74e4ea7128444afec36) use prefix matching instead of regex - [`496c622`](https://github.com/pocket-id/pocket-id/commit/496c6220ef9a4e4fbe1664b10b51d926310231d6) add validation and to lower for LOG_LEVEL ### 📊 Changes **6 files changed** (+54 additions, -48 deletions) <details> <summary>View changed files</summary> 📝 `backend/go.mod` (+2 -2) 📝 `backend/go.sum` (+2 -2) 📝 `backend/internal/bootstrap/db_bootstrap.go` (+7 -6) 📝 `backend/internal/bootstrap/observability_boostrap.go` (+7 -14) 📝 `backend/internal/bootstrap/router_bootstrap.go` (+28 -24) 📝 `backend/internal/common/env_config.go` (+8 -0) </details> ### 📄 Description This PR adds support for the `LOG_LEVEL` env variable. Additionally a few improvements were made: - Replaced `github.com/samber/slog-gin` with `github.com/gin-contrib/slog` - Removed `TextHandler` and use `tint.Handler` but without color if the output isn't a terminal Closes #294 --- <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:18:04 +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#532