lib/pushyd/consumer.rb in pushyd-0.20.1 vs lib/pushyd/consumer.rb in pushyd-0.21.0

- old
+ new

@@ -17,11 +17,11 @@ @conn = conn @rule = rule @rule_name = rule_name # Prepare logger - @logger = BmcDaemonLib::LoggerPool.instance.get :consumer + log_pipe :consumer # Create channel, prefetch only one message at a time @channel = @conn.create_channel @channel.prefetch(AMQP_PREFETCH) @@ -29,11 +29,13 @@ log_info "Consumer initialized" end protected - def log_prefix - [@rule_name] + def log_context + { + rule: @rule_name + } end # Handle the reception of a message on a queue def handle_message context, metadata, delivery_info, message = {} # Prepare data