Class: PerconaMigrator::LogSanitizers::PasswordSanitizer
- Inherits:
-
Object
- Object
- PerconaMigrator::LogSanitizers::PasswordSanitizer
- Defined in:
- lib/percona_migrator/log_sanitizers/password_sanitizer.rb
Constant Summary collapse
- PASSWORD_REPLACEMENT =
'[filtered_password]'
Instance Method Summary collapse
- #execute(log_statement) ⇒ Object
-
#initialize(connection_details) ⇒ PasswordSanitizer
constructor
A new instance of PasswordSanitizer.
Constructor Details
#initialize(connection_details) ⇒ PasswordSanitizer
Returns a new instance of PasswordSanitizer.
8 9 10 |
# File 'lib/percona_migrator/log_sanitizers/password_sanitizer.rb', line 8 def initialize(connection_details) @connection_details = connection_details end |
Instance Method Details
#execute(log_statement) ⇒ Object
12 13 14 15 |
# File 'lib/percona_migrator/log_sanitizers/password_sanitizer.rb', line 12 def execute(log_statement) return log_statement if password_argument.blank? log_statement.gsub(password_argument, PASSWORD_REPLACEMENT) end |