This is how I fixed it. Perhaps there are better options.
Tested only on Rails 2.3.8.
I added the log_info method to the SQLiteAdapter class in the activerecord nugget, which overrides the same method in AbstractAdapter.
def log_info(sql, name, ms)
unless sql.match(/sqlite_master/)
if @logger && @logger.debug?
name = '%s (%.1fms)' % [name || 'SQL', ms]
@logger.debug(format_log_entry(name, sql.squeeze(' ')))
end
end
end
therefore, any sql statement containing "sqlite_master" is not logged.
source
share