How to disable all CLI test logs in Rails 4?

I was able to disable related logs ActiveRecordby setting config.active_record.logger = niltoconfig/environments/test.rb

I am still getting the following results:

Processing by Admin::WebsitesController#edit as HTML
  Parameters: {"id"=>"226"}
  Rendered admin/websites/_form.html.erb (6.8ms)
  Rendered admin/websites/edit.html.erb within layouts/application (7.2ms)
Completed 200 OK in 36ms (Views: 33.5ms | ActiveRecord: 0.0ms)

I tried the following options, but they did not help:

ActiveRecord::Base.logger = nil
config.action_controller.logger = nil
config.action_view.logger = nil

What am I missing?

+4
source share
1 answer

Try setting the application log level to :fatalor 4(they are the same). For example. in config/environments/test.rb:

config.log_level = :fatal

See Rails Guides for more information, for example, the available log levels:

: :debug, :info, :warn, :error, :fatal :unknown, 0 5 .

+10

All Articles