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

Logger doesn't log to STDERR in Rails console if 'active_record/railties' not required #113

Open
zlobz opened this issue May 24, 2016 · 6 comments

Comments

@zlobz
Copy link

zlobz commented May 24, 2016

To fix the bug, add this code to Railtie:

    console do
      unless ActiveSupport::Logger.logger_outputs_to?(Rails.logger, STDERR, STDOUT)
        console = ActiveSupport::Logger.new(STDERR)
        Rails.logger.extend ActiveSupport::Logger.broadcast(console)
      end
    end
@zlobz zlobz changed the title Logger doesn't log to console if 'active_record/railties' not required Logger doesn't log to STDERR in Rails console if 'active_record/railties' not required May 24, 2016
@ludalex
Copy link

ludalex commented Jul 18, 2016

Which file exactly?

@zlobz
Copy link
Author

zlobz commented Jul 20, 2016

@ludalex
lib/sequel_rails/railtie.rb
or you can add the code to config/application.rb

@ludalex
Copy link

ludalex commented Jul 20, 2016

Thanks. Shouldn't this be a PR?

@zlobz
Copy link
Author

zlobz commented Jul 21, 2016

@ludalex
I'm lazy.

@JosephHalter
Copy link
Member

@JonathanTron is currently on vacations, he'll probably take care about it when he comes back.

@JosephHalter
Copy link
Member

(I'm lazy too)

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

3 participants