Class: LoggerFacade::Plugins::Airbrake
- Defined in:
- lib/logger_facade/plugins/airbrake.rb
Instance Attribute Summary collapse
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
Attributes inherited from Base
Instance Method Summary collapse
- #configure(&block) ⇒ Object
-
#initialize(environment = nil) ⇒ Airbrake
constructor
A new instance of Airbrake.
Methods inherited from Base
#debug, #error, #info, #is_debug, #trace, #warn
Constructor Details
#initialize(environment = nil) ⇒ Airbrake
Returns a new instance of Airbrake.
9 10 11 12 13 |
# File 'lib/logger_facade/plugins/airbrake.rb', line 9 def initialize(environment = nil) super("LoggerFacade::Plugins::Airbrake", { level: :error }) @environment = environment.to_s set_default_airbrake_config end |
Instance Attribute Details
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
7 8 9 |
# File 'lib/logger_facade/plugins/airbrake.rb', line 7 def environment @environment end |
Instance Method Details
#configure(&block) ⇒ Object
15 16 17 18 19 |
# File 'lib/logger_facade/plugins/airbrake.rb', line 15 def configure(&block) ::Airbrake.configure do |config| yield config end end |