lib/logjam_agent/railtie.rb in logjam_agent-0.26.1 vs lib/logjam_agent/railtie.rb in logjam_agent-0.26.2
- old
+ new
@@ -148,10 +148,10 @@
ActiveSupport::Notifications.unsubscribe("render_collection.action_view")
end
truncate_overlong_params = lambda { |key, value|
max_size = LogjamAgent.max_logged_size_for(key)
- if value.is_a?(String) && value.bytesize > max_size
+ if value.is_a?(String) && value.size > max_size
value[max_size..-1] = " ... [TRUNCATED]"
end
}
Rails.application.config.filter_parameters += [truncate_overlong_params]
end