Skip to content

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

DEV: Add env in dev to support verbose query log.

Guo Xiang Tan5503eba92406
diff --git a/config/environments/development.rb b/config/environments/development.rb
index ffada27d981..2a612c7164f 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -39,6 +39,10 @@ Discourse::Application.configure do
config.log_level = ENV['DISCOURSE_DEV_LOG_LEVEL'] if ENV['DISCOURSE_DEV_LOG_LEVEL']
+ if ENV['RAILS_VERBOSE_QUERY_LOGS']
+ config.active_record.verbose_query_logs = true
+ end
+
if defined?(BetterErrors)
BetterErrors::Middleware.allow_ip! ENV['TRUSTED_IP'] if ENV['TRUSTED_IP']