Stop sending ActiveRecord logs to STDOUT during test/rake
Opened this issue · 2 comments
dhh commented
I can't seem to find how ActiveRecord is sending the log lines both to STDOUT and to the development.log file. But when we're running rake and test, it shouldn't send to STDOUT (because it'll spam it with INSERTS for fixtures etc).
dhh commented
@tenderlove do you know where we're now setting this STDOUT listener? When I added it, it was simply ActiveRecord::Base.logger = Logger.new(STDOUT) for the console. But it seems like that has changed.
semaperepelitsa commented
Does it log to both? I don't see anything in *.log while in console.
Either ActiveRecord::Base.logger = Rails.logger
or changing log level should work.