-
Notifications
You must be signed in to change notification settings - Fork 19
Timber silence log from action_on_unpermitted_parameters #172
Comments
Hi @jonquach, that's odd. We'll take a look and see what's going on. Thanks for reporting. |
Hi @jonquach, good news and bad news. The bad news is that we could not reproduce; we tested this extensively and confirmed that it is working for us. The good news is that I'm thinking your log level is not set to An easy way to test on your end is to do throw this temporary code in your # config/initializers/timber.rb
class ::ActionController::LogSubsucriber
def unpermitted_parameters(event)
info do
unpermitted_keys = event.payload[:keys]
"Unpermitted parameter#{'s' if unpermitted_keys.size > 1}: #{unpermitted_keys.map { |e| ":#{e}" }.join(", ")}"
end
end
end This patch will raise the level to |
Hello @binarylogic, thanks for your help I tried to add the code you provided into But, after that I tried to edit the Do you have any idea why ? By the way, I notice that in the code snippet there is a typo on class ::ActionController::LogSubsucriber to class ::ActionController::LogSubscriber |
I tested on a new rails project from scratch, you can clone it here, it's the getting started from rails. I used rails 5.1. In the article_controller.rb, only the params |
Hi @jonquach thank you for putting this together. Going to pull down your test app and see what's going on. |
It seems that timber is silencing the logs from
action_on_unpermitted_parameters
, I currently have set indevelopement.rb
the following configuration:I also tried to set the silence integration to false:
But it still doesn't log the unpermitted params, maybe I missed something in the configuration, any help ?
The text was updated successfully, but these errors were encountered: