Rails has built in log filtering so you don\'t log passwords and credit cards. Works great for that but when you want to trigger a custom log (like to email) and send your
tadman answered correctly but here is some additional info:
In application.rb
config.filter_parameters += [:password, :password_confirmation, :credit_card]
Wherever you are doing custom logging:
f = ActionDispatch::Http::ParameterFilter.new(Rails.application.config.filter_parameters)
f.filter :order => {:credit_card => "4111111111111111"}
=> {:order=>{:credit_card=>"[FILTERED]"}}