Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#43 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
ruby

Research direction

Search the repository for the exact message "provide either a message or block" and inspect the logger.info path handling a nil message. The issue does not name a file or test; done requires an agreed behavior for nil messages and a diagnostic that identifies the gem if the call remains invalid.

Written by the indexing model from the issue text.

Description

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
Dominant language
Ruby
Stars
19
Forks
18
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from logdna/ruby

All issues in logdna/ruby

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.