lib/fluent/plugin/out_tdlog.rb in fluent-plugin-td-0.10.12 vs lib/fluent/plugin/out_tdlog.rb in fluent-plugin-td-0.10.13

- old
+ new

@@ -127,16 +127,16 @@ if !database || !table raise ConfigError, "'database' and 'table' parameter are required on tdlog output" end begin - TreasureData::API.normalize_database_name(database) + TreasureData::API.validate_database_name(database) rescue raise ConfigError, "Invalid database name #{database.inspect}: #{$!}: #{conf}" end begin - TreasureData::API.normalize_table_name(table) + TreasureData::API.validate_table_name(table) rescue raise ConfigError, "Invalid table name #{table.inspect}: #{$!}: #{conf}" end @key = "#{database}.#{table}" end @@ -177,11 +177,11 @@ def emit(tag, es, chain) if @key key = @key else database, table = tag.split('.')[-2,2] - TreasureData::API.normalize_database_name(database) - TreasureData::API.normalize_table_name(table) + database = TreasureData::API.normalize_database_name(database) + table = TreasureData::API.normalize_table_name(table) key = "#{database}.#{table}" end unless @auto_create_table check_table_exists(key)