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

Let WebConsole.logger respect Rails.logger #244

Merged
merged 1 commit into from
Aug 23, 2017

Conversation

gsamokovarov
Copy link
Collaborator

We used to set WebConsole.logger during Bundle.require time, which
happened to be way earlier than when Rails.logger was initialized, so we
always ended up with STDERR logger. In this change, we let
WebConsole.logger to dynamically call Rails.logger, which will let
us use it once initialized. If by the time we try to log something,
Rails.logger isn't initialized or is explicitly set to nothing, we'll
still fallback to the STDERR logging.

We used to set WebConsole.logger during Bundle.require time, which
happened to be way earlier than when Rails.logger was initialized, so we
always ended up with `STDERR` logger. In this change, we let
`WebConsole.logger` to dynamically call `Rails.logger`, which will let
us use it once initialized. If by the time we try to log something,
`Rails.logger` isn't initialized or is explicitly set to nothing, we'll
still fallback to the `STDERR` logging.
@gsamokovarov
Copy link
Collaborator Author

r? @matthewd

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

Successfully merging this pull request may close these issues.

2 participants