Log ActiveRecord to files in test and dev mode.