lib/fluent/plugin/out_tdlog.rb in fluent-plugin-td-0.10.18 vs lib/fluent/plugin/out_tdlog.rb in fluent-plugin-td-0.10.19

- old
+ new

@@ -63,15 +63,17 @@ # To support log_level option since Fluentd v0.10.43 unless method_defined?(:log) define_method(:log) { $log } end - config_param :endpoint, :string, :default => nil + config_param :endpoint, :string, :default => TreasureData::API::NEW_DEFAULT_ENDPOINT config_param :connect_timeout, :integer, :default => nil config_param :read_timeout, :integer, :default => nil config_param :send_timeout, :integer, :default => nil + config_set_default :buffer_type, 'file' + config_set_default :flush_interval, 300 def initialize require 'fileutils' require 'tempfile' require 'zlib' @@ -89,12 +91,10 @@ @key_num_limit = 5120 # TODO @record_size_limit = 32*1024*1024 # TODO @table_list = {} @auto_create_table = true @use_ssl = true - @buffer_type = 'file' # overwrite default buffer_type - @flush_interval = 300 # overwrite default flush_interval to 5mins @empty_gz_data = create_empty_gz_data end def configure(conf) super @@ -164,15 +164,10 @@ @anonymizes[key] = scr } @anonymizes = nil if @anonymizes.empty? @http_proxy = conf['http_proxy'] - @user_agent = "fluent-plugin-td: 0.10.18" # TODO: automatic increment version - - if @endpoint.nil? - $log.warn "tdlog plugin will change the API endpoint from api.treasure-data.com to api.treasuredata.com" - $log.warn "If want to keep api.treasure-data.com, please set 'endpoint api.treasure-data.com' in tdlog configuration" - end + @user_agent = "fluent-plugin-td: 0.10.19" # TODO: automatic increment version end def start super