We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccd9065 commit cb8d4efCopy full SHA for cb8d4ef
lib/fluent/plugin/in_mongo_tail.rb
@@ -118,10 +118,10 @@ def run
118
private
119
120
def client
121
- @client_options[:database] = @database
+ @client_options[:database] = @database if @database
122
@client_options[:user] = @user if @user
123
@client_options[:password] = @password if @password
124
- Mongo::Client.new(["#{node_string}"], @client_options)
+ Mongo::Client.new(node_string, @client_options)
125
end
126
127
def get_collection
@@ -133,9 +133,9 @@ def get_collection
133
def node_string
134
case
135
when @database
136
- "#{@host}:#{@port}"
+ ["#{@host}:#{@port}"]
137
when @url
138
- @url
+ "#{@url}"
139
140
141
0 commit comments