diff options
author | Daniel Guettler <daniel.guettler@gmail.com> | 2010-07-18 07:30:48 -0400 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-19 11:45:50 -0700 |
commit | 38f0161aabb302550e1522cb62d19e54d448be9b (patch) | |
tree | 5ae750c5337e155ccea2a8edd47430fa15854364 /activerecord/lib/active_record | |
parent | ad4ef4226fd5d47252d30effa41a3ab2f55dbc8d (diff) | |
download | rails-38f0161aabb302550e1522cb62d19e54d448be9b.tar.gz rails-38f0161aabb302550e1522cb62d19e54d448be9b.tar.bz2 rails-38f0161aabb302550e1522cb62d19e54d448be9b.zip |
Minor performance improvment in notifications/fanout and active_record/log_subscriber [#5098 state:open]
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/log_subscriber.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/log_subscriber.rb b/activerecord/lib/active_record/log_subscriber.rb index 89c79055fe..278e192e59 100644 --- a/activerecord/lib/active_record/log_subscriber.rb +++ b/activerecord/lib/active_record/log_subscriber.rb @@ -6,6 +6,8 @@ module ActiveRecord end def sql(event) + return unless logger.debug? + name = '%s (%.1fms)' % [event.payload[:name], event.duration] sql = event.payload[:sql].squeeze(' ') |