mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Merge pull request #10768 from Matt-Yorkley/query-logs
Improve query logging in development
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#
|
||||
# cp .env.development .env.local
|
||||
|
||||
VERBOSE_QUERY_LOGS=true
|
||||
|
||||
SECRET_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
||||
OFN_REDIS_URL="redis://localhost:6379/1"
|
||||
|
||||
1
Gemfile
1
Gemfile
@@ -178,6 +178,7 @@ group :development do
|
||||
gem 'foreman'
|
||||
gem 'listen'
|
||||
gem 'pry', '~> 0.13.0'
|
||||
gem 'query_count'
|
||||
gem 'rails-erd'
|
||||
gem 'rubocop'
|
||||
gem 'rubocop-rails'
|
||||
|
||||
@@ -487,6 +487,9 @@ GEM
|
||||
public_suffix (5.0.1)
|
||||
puma (6.2.2)
|
||||
nio4r (~> 2.0)
|
||||
query_count (1.1.1)
|
||||
activerecord (>= 4.2)
|
||||
railties (>= 4.2)
|
||||
raabro (1.4.0)
|
||||
racc (1.6.2)
|
||||
rack (2.2.7)
|
||||
@@ -857,6 +860,7 @@ DEPENDENCIES
|
||||
private_address_check
|
||||
pry (~> 0.13.0)
|
||||
puma
|
||||
query_count
|
||||
rack-mini-profiler (< 3.0.0)
|
||||
rack-rewrite
|
||||
rack-timeout
|
||||
|
||||
@@ -221,6 +221,9 @@ module Openfoodnetwork
|
||||
config.assets.precompile += ['shared/*']
|
||||
config.assets.precompile += ['*.jpg', '*.jpeg', '*.png', '*.gif' '*.svg']
|
||||
|
||||
# Highlight code that triggered database queries in logs.
|
||||
config.active_record.verbose_query_logs = ENV.fetch("VERBOSE_QUERY_LOGS", false)
|
||||
|
||||
# Apply framework defaults. New recommended defaults are successively added with each Rails version and
|
||||
# include the defaults from previous versions. For more info see:
|
||||
# https://guides.rubyonrails.org/configuring.html#results-of-config-load-defaults
|
||||
|
||||
Reference in New Issue
Block a user