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

This commit is contained in:
Guo Xiang Tan 2020-04-29 11:10:57 +08:00
parent 24b9759c60
commit 5503eba924
No known key found for this signature in database
GPG Key ID: FBD110179AAC1F20

View File

@ -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']