我正在尝试这样做:
config.filter_parameters << lambda do |k,v|
if k == "content"
v.slice!(250..-1)
v.insert(-1, "...[TRUNCATED]")
end
end
以便通过大的“内容”字段来管理日志。但是当我生成异常时,我得到以下堆栈跟踪。异常通知 3.0、Rails 3.2.8
想法?
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:40:in `dup'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:40:in `block (2 levels) in compiled_filter'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:32:in `each'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:32:in `block in compiled_filter'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:11:in `call'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:11:in `filter'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:36:in `block (2 levels) in compiled_filter'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:32:in `each'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:32:in `block in compiled_filter'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:11:in `call'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/parameter_filter.rb:11:in `filter'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_dispatch/http/filter_parameters.rb:38:in `filtered_env'
ruby/1.9.1/gems/exception_notification-3.0.0/lib/exception_notifier/views/exception_notifier/_environment.text.erb:1:in `__home_myappuser_myapp_shared_bundle_ruby_______gems_exception_notification_______lib_exception_notifier_views_exception_notifier__environment_text_erb__953280712_90713590'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_view/template.rb:145:in `block in render'
ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/notifications.rb:125:in `instrument'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_view/template.rb:143:in `render'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:265:in `render_partial'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:238:in `block in render'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'
ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_view/renderer/partial_renderer.rb:237:in `render'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_view/renderer/renderer.rb:41:in `render_partial'
ruby/1.9.1/gems/actionpack-3.2.8/lib/action_view/helpers/rendering_helper.rb:27:in `render'
ruby/1.9.1/gems/exception_notification-3.0.0/lib/exception_notifier/views/exception_notifier/exception_notification.text.erb:9:in `block in __home_myappuser_myapp_shared_bundle_ruby_______gems_exception_notification_______lib_exception_notifier_views_exception_notifier_exception_notification_text_erb___442452799_85036510'