lib/logstash/outputs/email.rb in logstash-output-email-4.1.1 vs lib/logstash/outputs/email.rb in logstash-output-email-4.1.2
- old
+ new
@@ -64,11 +64,11 @@
# Username to authenticate with the server
config :username, :validate => :string
# Password to authenticate with the server
- config :password, :validate => :string
+ config :password, :validate => :password
# Authentication method used when identifying with the server
config :authentication, :validate => :string
# Enables TLS when communicating with the server
@@ -104,11 +104,11 @@
options = {
:address => @address,
:port => @port,
:domain => @domain,
:user_name => @username,
- :password => @password,
+ :password => @password.nil? ? nil : @password.value,
:authentication => @authentication,
:enable_starttls_auto => @use_tls,
:debug => @debug
}
@@ -124,10 +124,12 @@
Mail.defaults do
delivery_method :@via, options
end
end # @via tests
@htmlTemplate = File.open(@template_file, "r").read unless @template_file.nil?
- @logger.debug("Email Output Registered!", :config => options, :via => @via)
+ log_options = options.clone
+ log_options[:password] = '<password>'
+ @logger.debug("Email Output Registered!", :config => log_options, :via => @via)
end # def register
public
def receive(event)