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

The LoggerWrapper initialize method is broken #84

Open
matt-wratt opened this issue Dec 4, 2014 · 0 comments
Open

The LoggerWrapper initialize method is broken #84

matt-wratt opened this issue Dec 4, 2014 · 0 comments

Comments

@matt-wratt
Copy link

There is no set_logger method on LoggerWrapper, set_logger should be set_real_logger. Currently when initializing the LoggerWrapper with a "real" logger, it will try to set the logger via the method_missing which will silently swallow the bug.

set_logger(real_logger)

Looks like there was an attempt to fix this in the past, but I suspect the fix highlighted other issues which were no-longer silently swallowed, but appeared to be brought about by the fix...
acd4f94

Although perhaps warnings were coming from the attempt to access the instance variable by use of the instance variable, instance_variable_defined?(@real_logger) should be instance_variable_defined?(:@real_logger). Perhaps the defined? method would be more appropriate here.

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