Class: Skydrive::RavenLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/skydrive/raven_logger.rb

Constant Summary collapse

ENV_KEY =
"RAVEN_SKYDRIVE_DSN"

Class Method Summary collapse

Class Method Details

.capture_exception(error) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/skydrive/raven_logger.rb', line 7

def self.capture_exception(error)
  return if Rails.env.test?
  if (ENV[ENV_KEY])
    config = Raven.configuration
    config.dsn = ENV.fetch(ENV_KEY)
  end
  Raven.capture_exception(error, {configuration: config})
end