Reputation: 407
i made a distribuited real-time system in RoR, it's compose by 2 machine.
PC A: take images from a Camera and send these to the second PC. So this machine send every second an http request with the image in the params. PC B - the server: save the image in a database.
My problem is that the log file become too big because log even the params string. How can i set the logger to truncate the params? or simply remove it?
sorry for my bad english..... i hope that someone can help me. Bye Davide Lentini.
Upvotes: 10
Views: 3852
Reputation: 3144
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]".
Upvotes: 26
Reputation: 5714
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
Upvotes: 6