Class: Honeybadger::Backend::Debug Private

Inherits:
Null
  • Object
show all
Defined in:
lib/honeybadger/backend/debug.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Logs the notice payload rather than sending it. The purpose of this backend is primarily for programmatically inspecting JSON payloads in integration tests.

Instance Method Summary collapse

Methods inherited from Null

#initialize

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Honeybadger::Backend::Null

Instance Method Details

#check_in(id) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


15
16
17
18
19
# File 'lib/honeybadger/backend/debug.rb', line 15

def check_in(id)
  logger.unknown("checking in debug backend with id=#{id}")
  return Response.new(ENV['DEBUG_BACKEND_STATUS'].to_i, nil) if ENV['DEBUG_BACKEND_STATUS']
  super
end

#notify(feature, payload) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


9
10
11
12
13
# File 'lib/honeybadger/backend/debug.rb', line 9

def notify(feature, payload)
  logger.unknown("notifying debug backend of feature=#{feature}\n\t#{payload.to_json}")
  return Response.new(ENV['DEBUG_BACKEND_STATUS'].to_i, nil) if ENV['DEBUG_BACKEND_STATUS']
  super
end