Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Entry.Level compared against DebugLevel is always false, so gated debug diagnostics never fire

オープン
#4,438 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
go

調査の方向性

auth/services/irma/signer.go:121、vcr/search.go:104、storage/engine.go:428 のチェックから始め、vcr/api/vcr/v2/registry.go:68 の動作しているパターンと比較します。設定されたデバッグロギングによって、QR、フィルタリングされた認証情報の概要、移行の詳細ログが有効になる一方で、削除された HTTP リクエストヘッダーのキャプチャは引き続き存在しないことを確認してください。

索引モデルが issue の本文から書いたものです。

説明

auth bug storage vcr

The module log.Logger() helpers return a *logrus.Entry created with logrus.StandardLogger().WithField(...). Entry.Level is the per-message level, which logrus only sets on the entry copy used during an actual log call; on these long-lived entries it stays at the zero value, PanicLevel (0). A comparison like log.Logger().Level >= logrus.DebugLevel is therefore always 0 >= 5, i.e. false, regardless of the configured verbosity.

Three call sites gate debug diagnostics this way, so those diagnostics can never be enabled:

  • auth/services/irma/signer.go:121: the QR code for an IRMA session is never printed.
  • vcr/search.go:104: the debug summary of credentials filtered out of search results (error message counts) is never logged.
  • storage/engine.go:428: goose.SetVerbose() always receives false, so migration verbosity cannot be switched on.

None of these discloses anything; they are missing diagnostics only. The fix is to repair the check, for example with logrus.IsLevelEnabled(logrus.DebugLevel) as already used correctly at vcr/api/vcr/v2/registry.go:68 (valid because the module loggers wrap the standard logger), or log.Logger().Logger.IsLevelEnabled(...).

A fourth instance in the HTTP request logger gated request header capture, including the Authorization header. That one was removed rather than repaired in #4437, because enabling it would have written bearer tokens to the logs.

主要言語
Go
スター
29
フォーク
24
平均マージ
2日 5時間
マージ済み PR(30日)
37

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nuts-foundation/nuts-node のほかの issue

nuts-foundation/nuts-node の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。