method
format_log_entry
format_log_entry(message, dump = nil)
protected
Hide source
# File activerecord/lib/active_record/connection_adapters/abstract_adapter.rb, line 102 def format_log_entry(message, dump = nil) if ActiveRecord::Base.colorize_logging if @@row_even @@row_even = false message_color, dump_color = "4;36;1", "0;1" else @@row_even = true message_color, dump_color = "4;35;1", "0" end log_entry = " \e[#{message_color}m#{message}\e[0m " log_entry << "\e[#{dump_color}m%#{String === dump ? 's' : 'p'}\e[0m" % dump if dump log_entry else "%s %s" % [message, dump] end end