lib/airbrake/logger.rb in airbrake-11.0.3 vs lib/airbrake/logger.rb in airbrake-12.0.0

- old
+ new

@@ -7,11 +7,11 @@ # Decorator for +Logger+ from stdlib. Endows loggers the ability to both log # and report errors to Airbrake. # # @example # # Create a logger like you normally do and decorate it. - # logger = Airbrake::AirbrakeLogger.new(Logger.new(STDOUT)) + # logger = Airbrake::AirbrakeLogger.new(Logger.new($stdout)) # # # Just use the logger like you normally do. # logger.fatal('oops') class AirbrakeLogger < SimpleDelegator # @example @@ -22,9 +22,11 @@ # @return [Integer] attr_reader :airbrake_level def initialize(logger) + super + __setobj__(logger) @airbrake_notifier = Airbrake self.level = logger.level end