Ruby on rails Rails ActiveRecord::Base.logger仅显示执行时间
有没有办法让Rails只显示SQL执行时间而不显示SQL查询本身?我提出了这个解决方案 类TimeLogFormatter<记录器 def format_messageseverity,timestamp,progname,msg 时间\u capture=msg.match/\[\d+m\w.\[\d\.]+ms\/ 如果时间被捕获 \e{time_capture}\e[0m\n 终止 终止 终止 ActiveRecord::Base.logger=TimeLogFormatter.NewstOutRuby on rails Rails ActiveRecord::Base.logger仅显示执行时间,ruby-on-rails,Ruby On Rails,有没有办法让Rails只显示SQL执行时间而不显示SQL查询本身?我提出了这个解决方案 类TimeLogFormatter