lib/fluent/plugin/out_tdlog.rb in fluent-plugin-td-0.10.4 vs lib/fluent/plugin/out_tdlog.rb in fluent-plugin-td-0.10.5
- old
+ new
@@ -76,16 +76,16 @@
if !database || !table
raise ConfigError, "'database' and 'table' parameter are required on tdlog output"
end
begin
- TreasureData::API.validate_database_name(database)
+ TreasureData::API.normalize_database_name(database)
rescue
raise ConfigError, "Invalid database name #{database.inspect}: #{$!}: #{conf}"
end
begin
- TreasureData::API.validate_table_name(table)
+ TreasureData::API.normalize_table_name(table)
rescue
raise ConfigError, "Invalid table name #{table.inspect}: #{$!}: #{conf}"
end
@key = "#{database}.#{table}"
end
@@ -102,11 +102,11 @@
def emit(tag, es, chain)
if @key
key = @key
else
database, table = tag.split('.')[-2,2]
- TreasureData::API.validate_database_name(database)
- TreasureData::API.validate_table_name(table)
+ TreasureData::API.normalize_database_name(database)
+ TreasureData::API.normalize_table_name(table)
key = "#{database}.#{table}"
end
unless @auto_create_table
check_table_exists(key)