lib/sqreen/capped_queue.rb in sqreen-1.15.1 vs lib/sqreen/capped_queue.rb in sqreen-1.15.2
- old
+ new
@@ -13,10 +13,14 @@
end
alias original_push push
def push(value)
- pop until size < @capacity
+ until size < @capacity
+ discarded = pop
+ Sqreen.log.debug { "Discarded from queue: #{discarded}" }
+ end
+ Sqreen.log.debug { "Pushed to the queue: #{value}" }
original_push(value)
end
end
end