-
Notifications
You must be signed in to change notification settings - Fork 155
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
undefined method `logger' for Rails:Module #180
Conversation
in some codebases Rails might be defined but not have a logger. This should avoid the issue.
Do you have an example of this happening? I would think not having |
Some gems define I've already patched this in other gems, e.g. resque/resque#1799
As a workaround I have this, but I think it would be best if gems did not assume just because Rails.define_singleton_method(:logger) { Logger.new($stdout) } |
Than's for the explanation, this seems good. Can you add a changelog entry for this as it's a change in behavior? I think that will also re-trigger CI to run. |
@schneems done |
Thanks! |
In some codebases Rails might be defined but not have a logger method defined. This should avoid the issue.