ruby on rails log file to big -> remove params from it ruby on rails log file to big -> remove params from it ruby-on-rails ruby-on-rails

ruby on rails log file to big -> remove params from it


To specifically remove certain params from the logs you can set the config.filter_parameters in application.rb like this:

config.filter_parameters += [:parameter_name]

This will replace the value of the filtered parameter with "[FILTERED]".


You can set the log level to be less verbose.

See the rails guide on debugging.

So for your entire application (in development), add this to config/environments/development.rb:

config.log_level = :warn # In any environment initializer, or

Or, to change the logging level directly in your application:

Rails.logger.level = 0 # at any time