Module: Raygun
- Extended by:
- Testable
- Defined in:
- lib/raygun.rb,
lib/raygun/client.rb,
lib/raygun/version.rb,
lib/raygun/testable.rb,
lib/raygun/configuration.rb,
lib/raygun/rack_exception_interceptor.rb,
lib/generators/raygun/install_generator.rb
Defined Under Namespace
Modules: Testable
Classes: Client, Configuration, InstallGenerator, ItWorksException, RackExceptionInterceptor, Railtie
Constant Summary
collapse
- CLIENT_URL =
used to identify ourselves to Raygun
"https://github.com/MindscapeHQ/raygun4ruby"
- CLIENT_NAME =
"Raygun4Ruby Gem"
- VERSION =
"0.0.5"
Class Attribute Summary collapse
Class Method Summary
collapse
Methods included from Testable
track_test_exception
Class Attribute Details
.configuration ⇒ Object
35
36
37
|
# File 'lib/raygun.rb', line 35
def configuration
@configuration ||= Configuration.new
end
|
Class Method Details
.failsafe_log(message) ⇒ Object
62
63
64
|
# File 'lib/raygun.rb', line 62
def failsafe_log(message)
configuration.failsafe_logger.info(message)
end
|
.log(message) ⇒ Object
58
59
60
|
# File 'lib/raygun.rb', line 58
def log(message)
configuration.logger.info(message) if configuration.logger
end
|
.setup {|configuration| ... } ⇒ Object
31
32
33
|
# File 'lib/raygun.rb', line 31
def setup
yield(configuration)
end
|
.track_exception(exception_instance, env = {}) ⇒ Object
39
40
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/raygun.rb', line 39
def track_exception(exception_instance, env = {})
if should_report?(exception_instance)
log("[Raygun] Tracking Exception...")
Client.new.track_exception(exception_instance, env)
end
rescue Exception => e
if configuration.failsafe_logger
failsafe_log("Problem reporting exception to Raygun: #{e.class}: #{e.message}\n\n#{e.backrace.join("\n")}")
else
raise e
end
end
|
.track_exceptions ⇒ Object
52
53
54
55
56
|
# File 'lib/raygun.rb', line 52
def track_exceptions
yield
rescue => e
track_exception(e)
end
|