解决方法
要完全关闭,只需将其添加到您的环境文件(即production.rb):
config.active_record.logger = nil
见AR guide(第3.6节):
config.active_record.logger accepts a logger conforming to the
interface of Log4r or the default Ruby Logger class,which is then
passed on to any new database connections made. You can retrieve this
logger by calling logger on either an Active Record model class or an
Active Record model instance. Set to nil to disable logging.
其他帖子中记录了更多选项(如选择性打开/关闭).以Disable Rails SQL logging in console为起点.