method
log
log(sql, name)
protected
Hide source
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 193 def log(sql, name) name ||= "SQL" @instrumenter.instrument("sql.active_record", :sql => sql, :name => name, :connection_id => object_id) do yield end rescue Exception => e message = "#{e.class.name}: #{e.message}: #{sql}" @logger.debug message if @logger raise translate_exception(e, message) end