Module: Synchrolog::Logger

Defined in:
lib/synchrolog/logger.rb,
lib/synchrolog/logger/http.rb,
lib/synchrolog/logger/https.rb

Defined Under Namespace

Classes: HTTP, HTTPS

Class Method Summary collapse

Class Method Details

.new(api_key, **args) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/synchrolog/logger.rb', line 6

def self.new(api_key, **args)
  args[:host] ||= 'https://input.synchrolog.com'
  if /^https:\/\//.match(args[:host])
    Synchrolog::Logger::HTTPS.new(api_key, args)
  else
    Synchrolog::Logger::HTTP.new(api_key, args)
  end
end