lib/fluent/plugin/out_mail.rb in fluent-plugin-mail-0.2.5 vs lib/fluent/plugin/out_mail.rb in fluent-plugin-mail-0.3.0

- old
+ new

@@ -15,15 +15,15 @@ end end end desc "Output comma delimited keys" - config_param :out_keys, :string, :default => "" + config_param :out_keys, :array, :default => [] desc "Format string to construct message body" config_param :message, :string, :default => nil desc "Specify comma delimited keys output to `message`" - config_param :message_out_keys, :string, :default => "" + config_param :message_out_keys, :array, :default => [] desc "Identify the timestamp of the record" config_param :time_key, :string, :default => nil desc "Identify the tag of the record" config_param :tag_key, :string, :default => 'tag' desc "SMTP server hostname" @@ -53,11 +53,11 @@ desc "Dynamically identify mail destination (Bcc) from records" config_param :bcc_key, :string, :default => nil desc "Format string to construct mail subject" config_param :subject, :string, :default => 'Fluent::MailOutput plugin' desc "Specify comma delimited keys output to `subject`" - config_param :subject_out_keys, :string, :default => "" + config_param :subject_out_keys, :array, :default => [] desc "If set to true, enable STARTTLS" config_param :enable_starttls_auto, :bool, :default => false desc "If set to true, enable TLS" config_param :enable_tls, :bool, :default => false desc "Format string to parse time" @@ -75,13 +75,9 @@ require 'string/scrub' if RUBY_VERSION.to_f < 2.1 end def configure(conf) super - - @out_keys = @out_keys.split(',') - @message_out_keys = @message_out_keys.split(',') - @subject_out_keys = @subject_out_keys.split(',') if @out_keys.empty? and @message.nil? raise Fluent::ConfigError, "Either 'message' or 'out_keys' must be specifed." end