1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove verbose_query_logs from new_framework_defaults_5_2.rb

The `app:update` rake task will regenerate `development.rb` so that it
contains this option; that means we're currently adding it to existing
apps in two places, which is unnecessary and confusing.

Also:
 - Remove inaccurate comment about which stack frames are ignored
 - Clarify that the feature uses `caller_locations`, not `caller`
 - Remove unused return value in `extract_callstack`
This commit is contained in:
Eugene Kenny 2017-12-20 01:09:23 +00:00
parent 08b9d8b3e0
commit 69d5a74393
3 changed files with 3 additions and 7 deletions

View file

@ -15,11 +15,11 @@
Add `verbose_query_logs` configuration option to display the caller
of database queries in the log to facilitate N+1 query resolution
and other debugging. Excludes Ruby and Rails callers but not gems.
and other debugging.
Enabled in development only for new and upgraded applications. Not
recommended for use in the production environment since it relies
on Ruby's `Kernel#caller` which is fairly slow.
on Ruby's `Kernel#caller_locations` which is fairly slow.
*Olivier Lacan*

View file

@ -121,8 +121,7 @@ module ActiveRecord
[
offending_line.path,
offending_line.lineno,
offending_line.label
offending_line.lineno
]
end

View file

@ -25,6 +25,3 @@
# Store boolean values are in sqlite3 databases as 1 and 0 instead of 't' and
# 'f' after migrating old data.
# Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
# Highlight code that triggered database queries in logs.
Rails.application.config.active_record.verbose_query_logs = Rails.env.development?