Home > Software engineering >  How to mask email addresses in logs of RoR application?
How to mask email addresses in logs of RoR application?

Time:03-21

I would like to mask all email addresses in logs of RoR application.

[email protected] -> ***

CodePudding user response:

In you application.rb file use

filter_parameter_logging “email”

CodePudding user response:

If you don't have filter_parameter_logging file in initializers then create one and set following

Rails.application.config.filter_parameters  = [
  :email, :password, :anything_else
]
  • Related