Fix scoping error for logger in Rails 4