Module: Sysloggly

Defined in:
lib/sysloggly.rb,
lib/sysloggly/rails.rb,
lib/sysloggly/client.rb,
lib/sysloggly/version.rb,
lib/sysloggly/client/syslog.rb,
lib/sysloggly/client/filelog.rb,
lib/sysloggly/extensions/honeybadger.rb

Overview

Sysloggly default configuration:

@config progname: Rails app name
@config env:      Rails env
@config logger:   file log to sysloggly.log in the rails log directory

Defined Under Namespace

Modules: Client, Extensions Classes: InputURLRequired, Railtie, UnknownFacility, UnsupportedScheme

Constant Summary collapse

VERSION =
'0.2.0'

Class Method Summary collapse

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Sysloggly)

    the object that the method was called on



15
16
17
# File 'lib/sysloggly.rb', line 15

def self.configure
  yield self
end

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



19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/sysloggly.rb', line 19

def self.new(url, opts = {})
  client = Sysloggly::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