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