diff options
author | Xavier Noria <fxn@hashref.com> | 2012-01-26 02:50:46 -0800 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2012-01-26 02:51:18 -0800 |
commit | 24834606c2c41c362ea10b8ae35b45aaffd9c483 (patch) | |
tree | 74146880de1e50d8b8bfe04e3d4edf22fb492865 /railties/guides | |
parent | 3a087b8b5e3da3f8cf5a68b6bd354497810bbbd9 (diff) | |
download | rails-24834606c2c41c362ea10b8ae35b45aaffd9c483.tar.gz rails-24834606c2c41c362ea10b8ae35b45aaffd9c483.tar.bz2 rails-24834606c2c41c362ea10b8ae35b45aaffd9c483.zip |
disable automatic explain if there is no logger [closes #4671]
Diffstat (limited to 'railties/guides')
-rw-r--r-- | railties/guides/source/active_record_querying.textile | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/railties/guides/source/active_record_querying.textile b/railties/guides/source/active_record_querying.textile index 5970a45839..e46410ce59 100644 --- a/railties/guides/source/active_record_querying.textile +++ b/railties/guides/source/active_record_querying.textile @@ -1400,6 +1400,9 @@ A threshold of +nil+ disables automatic EXPLAINs. The default threshold in development mode is 0.5 seconds, and +nil+ in test and production modes. +INFO. Automatic EXPLAIN gets disabled if Active Record has no logger, regardless +of the value of the threshold. + h5. Disabling Automatic EXPLAIN Automatic EXPLAIN can be selectively silenced with +ActiveRecord::Base.silence_auto_explain+: |