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

why output "provide either a message or block" if message is nil?

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
ruby

調査の方向性

リポジトリで正確なメッセージ "provide either a message or block" を検索し、logger.info パスで nil message がどのように処理されるかを調査します。Issue ではファイルもテストも指定されていません。完了の条件は、nil messages に対する合意済みの動作と、呼び出しが引き続き無効な場合に gem を特定する診断が定められていることです。

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

説明

Was tracking down some mystery "DEBUG -- : provide either a message or block" messages in my logs.

Finally found one reference to it, in another issue here for logdna.

It's a terribly unhelpful message, as it gives zero indication of what gem is outputting it... please MENTION your gem name in such messages.

But more to the point, what is wrong with a nil message?

It seems to me that this code:

logger.info
logger.info
logger.info "NOTICE ME!"
logger.info
logger.info

is legitimate and should output 5 INFO lines to the log, 4 without a text message, NOT 4 cryptic "DEBUG" lines saying "provide either a message or block" messages

I'm not sure where in your code it is, but here's your code that IMO ought be removed, or at least mention the source of the message eg the "logdna gem"

if message.nil?
    @internal_logger.debug("provide either a message or block")
    return
  end
主要言語
Ruby
スター
19
フォーク
18
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

logdna/ruby のほかの issue

logdna/ruby の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

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

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