Skip to content

Commit 670b533

Browse files
committed
Collection name can be used dynamically when using mongo tail
Signed-off-by: Kim Sung-Jun <[email protected]>
1 parent 55f39ed commit 670b533

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/fluent/plugin/in_mongo_tail.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ def configure(conf)
6969
raise Fluent::ConfigError, "One of 'database' or 'url' must be specified"
7070
end
7171

72+
date = Time.now
73+
@collection = date.strftime(collection)
7274
@last_id = @id_store_file ? get_last_id : nil
7375
@connection_options[:ssl] = @ssl
7476

0 commit comments

Comments
 (0)