Class: LoggerFacade::Plugins::Airbrake

Inherits:
Base
  • Object
show all
Defined in:
lib/logger_facade/plugins/airbrake.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#config, #level, #name

Instance Method Summary collapse

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

#environmentObject (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