Module: Logglier

Defined in:
lib/logglier.rb,
lib/logglier/client.rb,
lib/logglier/version.rb,
lib/logglier/client/http.rb,
lib/logglier/client/syslog.rb,
lib/logglier/client/http/sync.rb,
lib/logglier/client/http/threaded.rb

Defined Under Namespace

Modules: Client Classes: InputURLRequired, UnknownFacility, UnsupportedScheme

Constant Summary collapse

VERSION =
'0.5.0'

Class Method Summary collapse

Class Method Details

.new(url, opts = {}) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/logglier.rb', line 11

def self.new(url, opts={})
  client = Logglier::Client.new(url, opts)
  logger = Logger.new(client)

  if client.respond_to?(:formatter)
    logger.formatter = client.formatter
  elsif client.respond_to?(:datetime_format)
    logger.datetime_format = client.datetime_format
  end

  logger
end