Skip to content

A platform for community discussion. Free, open, simple.

DEV: Add env var to disable ActiveRecord logging in development (#10979)

Martin Brennan3ae1f98dc84b
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 55a3f3bc106..9659c1ca5b5 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -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