I allow users to upload files on my site. And some of those files can be very large and it eats up a huge chunk of my log files. So I would like to not have it show up. I know about:
config.filter_parameters += [:password]
To filter certain parameters. But the problem with this is that it the parameter is in a hash like this:
{
:person => {
:name => 'bob',
:file => {
:data => 'really long data. this can be tens of thousands of characters long'
}
}
}
I could add :data to the filter_parameters but that would hiding lots of logs across the whole site since data is a common key (I also can't rename this to something more obscure). Is it possible for filter_parameters to take in a nested parameter? Or is there another way to limit the length of all parameters so if they come in bigger than a certain size, it would not be stored in my log files.