lib/semantic_logger/appender/splunk.rb in semantic_logger-2.15.0 vs lib/semantic_logger/appender/splunk.rb in semantic_logger-2.16.0
- old
+ new
@@ -18,11 +18,11 @@
# After forking an active process call #reopen to re-open
# open the handles to resources
def reopen
# Connect to splunk. Connect is a synonym for creating a Service by hand and calling login.
- @service = Splunk::connect(@config)
+ @service = Splunk::connect(@config)
# The index we are logging to
@service_index = @service.indexes[@index]
end
@@ -44,16 +44,16 @@
port: options[:port] || 8089,
username: options[:username],
password: options[:password]
}
- @index = options[:index]
+ @index = options[:index] || 'main'
if @config[:username].nil?
raise ArgumentError, 'Must supply a username.'
elsif @config[:password].nil?
raise ArgumentError, 'Must supply a password.'
elsif @index.nil?
raise ArgumentError, 'Must supply an index.'
end
end
-end
\ No newline at end of file
+end