Dan Tenenbaum
2006-May-22 19:25 UTC
[Rails] selectively disabling parameter logging in controllers
By default, Rails logs all parameters passed to a controller method. As far as I can tell, this happens in both development and production modes. I have a form that collects some sensitive data. I don''t want that data sent to the log, at least not in production mode. Of course, I''d still like to log everything else. Is there a way to accomplish this? -- Posted via http://www.ruby-forum.com/.
Tarmo Tänav
2006-May-23 04:10 UTC
[Rails] selectively disabling parameter logging in controllers
On E, 2006-05-22 at 21:25 +0200, Dan Tenenbaum wrote:> By default, Rails logs all parameters passed to a controller method. > As far as I can tell, this happens in both development and production > modes. > > I have a form that collects some sensitive data. I don''t want that data > sent to the log, at least not in production mode. Of course, I''d still > like to log everything else. Is there a way to accomplish this? > >This should do exactly what you need: http://wiki.rubyonrails.org/rails/pages/Filter+Logged+Params+Plugin -- Tarmo T?nav <tarmo@itech.ee>
Jeremy Evans
2006-May-23 16:15 UTC
[Rails] selectively disabling parameter logging in controllers
On 5/22/06, Tarmo T?nav <tarmo@itech.ee> wrote:> On E, 2006-05-22 at 21:25 +0200, Dan Tenenbaum wrote: > > By default, Rails logs all parameters passed to a controller method. > > As far as I can tell, this happens in both development and production > > modes. > > > > I have a form that collects some sensitive data. I don''t want that data > > sent to the log, at least not in production mode. Of course, I''d still > > like to log everything else. Is there a way to accomplish this? > > > This should do exactly what you need: > http://wiki.rubyonrails.org/rails/pages/Filter+Logged+Params+PluginAlso note that this is in Edge Rails: http://dev.rubyonrails.org/changeset/4200