diff options
author | Arthur Neves <arthurnn@gmail.com> | 2013-09-28 12:00:19 -0400 |
---|---|---|
committer | Arthur Neves <arthurnn@gmail.com> | 2013-09-28 12:00:19 -0400 |
commit | 260f96589076948d7f4b7200b34740ee671fe2c7 (patch) | |
tree | 47dcd1a87f5831f3e1c0781ba18977a71150504f | |
parent | 7045a5bf37094a05e8cfe9f584e3965de3f63901 (diff) | |
download | rails-260f96589076948d7f4b7200b34740ee671fe2c7.tar.gz rails-260f96589076948d7f4b7200b34740ee671fe2c7.tar.bz2 rails-260f96589076948d7f4b7200b34740ee671fe2c7.zip |
Cleanup identitymap logger from LogSubscriber
Also renaming ivar @odd_or_even to @odd
-rw-r--r-- | activerecord/lib/active_record/log_subscriber.rb | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/activerecord/lib/active_record/log_subscriber.rb b/activerecord/lib/active_record/log_subscriber.rb index 0358a36b14..927fbab8f0 100644 --- a/activerecord/lib/active_record/log_subscriber.rb +++ b/activerecord/lib/active_record/log_subscriber.rb @@ -17,7 +17,7 @@ module ActiveRecord def initialize super - @odd_or_even = false + @odd = false end def render_bind(column, value) @@ -60,17 +60,8 @@ module ActiveRecord debug " #{name} #{sql}#{binds}" end - def identity(event) - return unless logger.debug? - - name = color(event.payload[:name], odd? ? CYAN : MAGENTA, true) - line = odd? ? color(event.payload[:line], nil, true) : event.payload[:line] - - debug " #{name} #{line}" - end - def odd? - @odd_or_even = !@odd_or_even + @odd = !@odd end def logger |