diff options
author | Fernando Tapia Rico <fertapric@gmail.com> | 2016-05-11 01:01:27 +0200 |
---|---|---|
committer | Fernando Tapia Rico <fertapric@gmail.com> | 2016-05-11 01:01:27 +0200 |
commit | b67e260cd58f78596e6145727593fa47705b503f (patch) | |
tree | 248664264efd184d5bd2895632801a61c9eb9049 /activerecord | |
parent | 932655a4ef61083da98724bb612d00f89e153c46 (diff) | |
download | rails-b67e260cd58f78596e6145727593fa47705b503f.tar.gz rails-b67e260cd58f78596e6145727593fa47705b503f.tar.bz2 rails-b67e260cd58f78596e6145727593fa47705b503f.zip |
Fix DB runtimes on production log
Rails default production configuration establishes "info" as log level.
Due to the changes included on commit
191facc857bb4fb52078fb544c6bc1613a81cc80, db runtimes were not being
collected if the log level was different than "debug", and 0.0 ms was
the runtime reported on production logs.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/log_subscriber.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/log_subscriber.rb b/activerecord/lib/active_record/log_subscriber.rb index efa2a4df02..3fa36d8101 100644 --- a/activerecord/lib/active_record/log_subscriber.rb +++ b/activerecord/lib/active_record/log_subscriber.rb @@ -31,9 +31,8 @@ module ActiveRecord end def sql(event) - return unless logger.debug? - self.class.runtime += event.duration + return unless logger.debug? payload = event.payload |