Sha256: 35314321330a5277643f46137ba30845e85edca4b30db486bd88e3713737b0d3

Contents?: true

Size: 631 Bytes

Versions: 2

Compression:

Stored size: 631 Bytes

Contents

class DummyLogger
    attr_reader :logs
    attr_accessor :level

    def initialize
      @logs = []
    end
  
    def debug(message)
      log('debug', message)
    end
  
    def info(message)
      log('info', message)
    end
  
    def warn(message)
      log('warn', message)
    end
  
    def error(message)
      log('error', message)
    end
  
    def fatal(message)
      log('fatal', message)
    end
  
    def unknown(message)
      log('unknown', message)
    end

    def broadcast_to(arg1, arg2)
    end
  
    private
  
    def log(level, message)
      @logs << { level: level, message: message }
    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stackify-api-ruby-2.1.0 spec/helpers/dummy_logger.rb
stackify-api-ruby-2.1.0.beta1 spec/helpers/dummy_logger.rb