Skip to content

Commit

Permalink
Collection name can be used dynamically when using mongo tail
Browse files Browse the repository at this point in the history
Signed-off-by: Kim Sung-Jun <[email protected]>
  • Loading branch information
clauzewitz committed Sep 11, 2019
1 parent 55f39ed commit 670b533
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/fluent/plugin/in_mongo_tail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def configure(conf)
raise Fluent::ConfigError, "One of 'database' or 'url' must be specified"
end

date = Time.now
@collection = date.strftime(collection)
@last_id = @id_store_file ? get_last_id : nil
@connection_options[:ssl] = @ssl

Expand Down

0 comments on commit 670b533

Please sign in to comment.