-
Notifications
You must be signed in to change notification settings - Fork 29
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
Ruby 2.7: Logger Warnings #104
Comments
I just wanted to add some further context to the conversation. Here's a link to the Logger constructor in the standard library. |
jessedoyle
added a commit
to jessedoyle/lamby
that referenced
this issue
Jun 30, 2021
* resolves rails-lambda#104 Lamby overrides the default implementation of `Logger` in the standard library and provides a constructor to redirect all log output to STDOUT. When run in Ruby 2.7, the constructor override causes the interpreter to emit the following warning: ``` warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call ``` A simple fix for this warning is to proxy the keyword arguments in the override to the original defnintion using the double-splat (`**`) operator.
metaskills
added a commit
that referenced
this issue
Jun 30, 2021
fix(ruby-27): Ruby 2.7 Warnings | Logger
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi There,
Thanks again for making a great library!
I recently wrote the following code in my app running ruby 2.7.1:
I noticed the following warning that was emitted by the interpreter:
It looks like Lamby is overwriting the constructor for the
Logger
class in the standard library - is this necessary?An easy fix may be to use the double-splat (
**
) operator in the definition of the override. If you want, I can submit a PR to make this change?Thanks!
The text was updated successfully, but these errors were encountered: