Class: Capistrano::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/capistrano/ext/sanitizer.rb

Overview

Extend Capistrano::Loger to filter svn passwords

Instance Method Summary collapse

Instance Method Details

#log(level, message, line_prefix = nil) ⇒ Object

Replace a svn password with <filtered> from the message string



5
6
7
8
# File 'lib/capistrano/ext/sanitizer.rb', line 5

def log(level, message, line_prefix=nil) 
  message = message.gsub(/(--password) (\S+)/, "\\1 <filtered>")
  previous_log_method level, message, line_prefix 
end

#previous_log_methodObject



3
# File 'lib/capistrano/ext/sanitizer.rb', line 3

alias previous_log_method log