Class: Warren::Handler::Log::Queue

Inherits:
Object
  • Object
show all
Defined in:
lib/warren/handler/log.rb

Overview

Queue class to provide extended logging in development mode

Instance Method Summary collapse

Constructor Details

#initialize(logger, name) ⇒ Queue

Returns a new instance of Queue.



55
56
57
58
# File 'lib/warren/handler/log.rb', line 55

def initialize(logger, name)
  @logger = logger
  @name = name
end

Instance Method Details

#bind(exchange, options) ⇒ Object



60
61
62
# File 'lib/warren/handler/log.rb', line 60

def bind(exchange, options)
  @logger.debug "Bound queue #{@name}: #{exchange}, #{options.inspect}"
end

#subscribe(options) ⇒ Object



64
65
66
67
68
# File 'lib/warren/handler/log.rb', line 64

def subscribe(options)
  @logger.debug "Subscribed to queue #{@name}: #{options.inspect}"
  @logger.warn 'This is a Warren::Handler::Log no messages will be processed'
  nil
end