mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Add env var to disable ActiveRecord logging in development (#10979)
If RAILS_DISABLE_ACTIVERECORD_LOGS=1 is passed when starting Rails, none of the query log output will show. This is very useful for debugging with breakpoints because logs are not flooding in constantly.
This commit is contained in:
@@ -93,6 +93,10 @@ Discourse::Application.configure do
|
||||
end
|
||||
end
|
||||
|
||||
if ENV["RAILS_DISABLE_ACTIVERECORD_LOGS"] == "1"
|
||||
ActiveRecord::Base.logger = nil
|
||||
end
|
||||
|
||||
if ENV['BULLET']
|
||||
Bullet.enable = true
|
||||
Bullet.rails_logger = true
|
||||
|
||||
Reference in New Issue
Block a user