why output "provide either a message or block" if message is nil?
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
- Domain
- observability-sre
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
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.
More from logdna/ruby
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
TheOdinProject/curriculum#31417 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
glossarist/glossarist-ruby#238 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
palladius/rails8-app-on-gcp#145 ·