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:
parent
516e7e392b
commit
3ae1f98dc8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue