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

Stop logging to STDOUT and establishing DB connection on init #28

Closed
wants to merge 2 commits into from

Conversation

anakinj
Copy link

@anakinj anakinj commented Feb 12, 2021

Hi,

This PR removes the setting of a default STDOUT logger when requiring the GEM. I think most apps want to control how queries are logged and not log activerecord things into STDOUT

This PR also changes the configure methods not to establish a db connection. For example on an application that has some kind of control process the connection established on initialization cannot be used in the forks anyway.

Think it's also recommended not to connect to the database on boot:
https://github.com/rails/rails/blob/main/activerecord/lib/active_record/railtie.rb#L254

@jhollinger
Copy link
Owner

Applied in 2.1.0 - thanks!

@jhollinger jhollinger closed this Jan 30, 2022
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