Flowdock
method

sql

Importance_0
v3.0.5 - Show latest stable - 0 notes - Class: ActiveRecord::LogSubscriber
sql(event) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/log_subscriber.rb, line 21
    def sql(event)
      self.class.runtime += event.duration
      return unless logger.debug?

      name = '%s (%.1fms)' % [event.payload[:name], event.duration]
      sql  = event.payload[:sql].squeeze(' ')

      if odd?
        name = color(name, CYAN, true)
        sql  = color(sql, nil, true)
      else
        name = color(name, MAGENTA, true)
      end

      debug "  #{name}  #{sql}"
    end
Register or log in to add new notes.