Module: ExceptionDog

Defined in:
lib/exception_dog.rb,
lib/exception_dog/handler.rb,
lib/exception_dog/version.rb,
lib/exception_dog/log_notifier.rb,
lib/exception_dog/http_notifier.rb,
lib/exception_dog/agent_notifier.rb

Defined Under Namespace

Modules: Integrations Classes: AgentNotifier, Configuration, Handler, HttpNotifier, LogNotifier

Constant Summary collapse

VERSION =
"0.3.4"

Class Method Summary collapse

Class Method Details

.configurationObject



52
53
54
# File 'lib/exception_dog.rb', line 52

def configuration
  @configuration
end

.configure {|@configuration| ... } ⇒ Object

Yields:



56
57
58
59
60
61
62
63
64
65
66
# File 'lib/exception_dog.rb', line 56

def configure
  @configuration = Configuration.new
  yield @configuration
  @configuration.logger ||= Logger.new(STDOUT)
  if !configuration.valid?
    @configuration.logger.error "Invalid ExceptionDog config #{configuration.errors.inspect}"
    @configuration.notifier = "LogNotifier"
  end
  @handler = Handler.new(configuration)
  @configuration
end

.default_hostnameObject



72
73
74
# File 'lib/exception_dog.rb', line 72

def default_hostname
  Socket.gethostname;
end

.notify(exception, data = {}) ⇒ Object



68
69
70
# File 'lib/exception_dog.rb', line 68

def notify(exception, data = {})
  @handler.notify(exception, data)
end