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.
2 parents 796b6ea + 023e192 commit 076039fCopy full SHA for 076039f
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,7 +133,7 @@ def get_collection
133
def node_string
134
case
135
when @database
136
- "#{@host}:#{@port}"
+ ["#{@host}:#{@port}"]
137
when @url
138
@url
139
0 commit comments