Shorter backtrace in the SQL logs

This commit is contained in:
Raphael Sofaer 2011-07-15 15:27:25 -07:00 committed by root
parent 5d64611f2b
commit fb492b2b62

View file

@ -107,7 +107,7 @@ module ActiveRecord
log_string = "event=sql name='#{payload[:name]}' ms=#{event.duration} query='#{sql}'"
cleaned_trace = Rails.backtrace_cleaner.clean(caller)
log_string << "backtrace_hash=#{cleaned_trace.hash} binds='#{binds}' application_backtrace='#{cleaned_trace.inspect}'"
log_string << "backtrace_hash=#{cleaned_trace.hash} binds='#{binds}' application_backtrace='#{cleaned_trace[0..2].inspect}'"
info log_string
end