why output "provide either a message or block" if message is nil?
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 19
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
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
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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.
Assessment
- Tech stack
- ruby
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100