Class: Tartarus
- Inherits:
-
Object
show all
- Defined in:
- lib/tartarus.rb
Defined Under Namespace
Modules: Logger, Notifiers
Classes: Rack, Railtie
Class Method Summary
collapse
Class Method Details
.configuration(file = nil) ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/tartarus.rb', line 8
def configuration( file = nil )
if defined?(Rails)
@cached_configuration ||= YAML.load_file(file || "#{Rails.root}/config/exceptions.yml" )[Rails.env]
else
@cached_configuration ||= YAML.load_file(file)
end
end
|
.log(controller, exception) ⇒ Object
24
25
26
|
# File 'lib/tartarus.rb', line 24
def log(controller, exception)
logger_class.log(controller, exception)
end
|
.logger_class ⇒ Object
16
17
18
|
# File 'lib/tartarus.rb', line 16
def logger_class
configuration['logger_class'].constantize
end
|
.logging_enabled? ⇒ Boolean
20
21
22
|
# File 'lib/tartarus.rb', line 20
def logging_enabled?
configuration['logging_enabled'] == true
end
|