Sha256: 823deed202fa57dde17bbb8186646273b563814426437a905795a6e365dec374

Contents?: true

Size: 767 Bytes

Versions: 1

Compression:

Stored size: 767 Bytes

Contents

require 'soar_auditor_api'
require 'byebug'

class SanityAuditor < SoarAuditorAPI
  def configuration_is_valid(configuration)
    return true
  end

  def audit(data)
    puts data
  end
end

class Main
  def test_sanity
    @iut = SanityAuditor.new
    @iut.configure(nil)

    some_debug_object = 123
    @iut.info("This is info")
    @iut.debug(some_debug_object)
    dropped = 95
    @iut.warn("Statistics show that dropped packets have increased to #{dropped}%")
    @iut.error("Could not resend some dropped packets. They have been lost. All is still OK, I could compensate")
    @iut.fatal("Unable to perform action, too many dropped packets. Functional degradation.")
    @iut << 'Rack::CommonLogger requires this'
  end
end

main = Main.new
main.test_sanity

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
soar_auditor_api-0.0.1 sanity/sanity.rb