Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jpwynn opened this issue May 9, 2022 · 0 comments
Open

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

jpwynn opened this issue May 9, 2022 · 0 comments

Comments

@jpwynn
Copy link

jpwynn commented May 9, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant