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

Allow log methods to receive block #3

Merged
merged 3 commits into from Jun 1, 2018
Merged

Allow log methods to receive block #3

merged 3 commits into from Jun 1, 2018

Conversation

ndrisso
Copy link
Contributor

@ndrisso ndrisso commented May 8, 2018

As the Ruby logger does, logging methods should be able to receive a block with the message, that allows to delay the evaluation of complex messages until the message is actually logged.

Also by doing this, this gem will be out of the box compatible with Rails, in the sense that it will work with the Rack middleware responsable of logging every request https://github.com/rails/rails/blob/ee35b79d4cff24b960be54c3f5c4f46627c069fe/railties/lib/rails/rack/logger.rb#L37

Nicolas Risso added 3 commits May 8, 2018 11:33
As the Ruby logger does, logging methods should be able to receive a block with the message, that allows to delay the evaluation of complex messages until the message is actually logged.
@ndrisso
Copy link
Contributor Author

ndrisso commented Jun 1, 2018

Hi @respectus! What do you think about this PR?

@respectus
Copy link
Contributor

respectus commented Jun 1, 2018

Hi @ndrisso,
Thanks for this helpful PR, sorry I got so delayed in reviewing it. Really appreciate you adding this functionality. I'll be merging this in and I'll push it to RubyGems today. Do let me know if you have any other issues, thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants