[PR #1023] [MERGED] Add ability to change log level #1125

Closed
opened 2026-03-03 12:33:10 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/1023
Author: @RachitSharma2001
Created: 12/28/2022
Status: Merged
Merged: 12/28/2022
Merged by: @fsouza

Base: mainHead: add_log_flag


📝 Commits (1)

  • dc07c5f Add ability to change log level

📊 Changes

3 files changed (+23 additions, -3 deletions)

View changed files

📝 internal/config/config.go (+13 -3)
📝 internal/config/config_test.go (+9 -0)
📝 main.go (+1 -0)

📄 Description

Addresses #932

Adds the -log-level flag. From my analysis, it seems like there really are only three kinds of logs made by the gcs server:

  1. Info logs: Http request logs and some other information logs made by main.go
  2. Warning logs
  3. Error logs

Nonetheless, the user can specify, with a string, one of the 7 accepted levels from the logrus package: fatal, panic, error, warning, info, debug, or trace, and the appropriate log level will be set.


🔄 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/fsouza/fake-gcs-server/pull/1023 **Author:** [@RachitSharma2001](https://github.com/RachitSharma2001) **Created:** 12/28/2022 **Status:** ✅ Merged **Merged:** 12/28/2022 **Merged by:** [@fsouza](https://github.com/fsouza) **Base:** `main` ← **Head:** `add_log_flag` --- ### 📝 Commits (1) - [`dc07c5f`](https://github.com/fsouza/fake-gcs-server/commit/dc07c5f733a513fcc8470f503cecfc8024a4e701) Add ability to change log level ### 📊 Changes **3 files changed** (+23 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `internal/config/config.go` (+13 -3) 📝 `internal/config/config_test.go` (+9 -0) 📝 `main.go` (+1 -0) </details> ### 📄 Description Addresses #932 Adds the `-log-level` flag. From my analysis, it seems like there really are only three kinds of logs made by the gcs server: 1. Info logs: Http request logs and some other information logs made by `main.go` 2. Warning logs 3. Error logs Nonetheless, the user can specify, with a string, one of the 7 accepted levels from the [logrus](https://pkg.go.dev/github.com/sirupsen/logrus) package: fatal, panic, error, warning, info, debug, or trace, and the appropriate log level will be set. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:33:10 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#1125
No description provided.