From 10527ee39a6e13680c62cf86f7ed878607256642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20B=C3=B6rjesson?= Date: Mon, 18 Nov 2024 08:47:36 +0100 Subject: [PATCH] Log number of messages loaded (#848) --- src/lavinmq/amqp/queue/message_store.cr | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lavinmq/amqp/queue/message_store.cr b/src/lavinmq/amqp/queue/message_store.cr index 761a3a5af2..43de3396fc 100644 --- a/src/lavinmq/amqp/queue/message_store.cr +++ b/src/lavinmq/amqp/queue/message_store.cr @@ -376,14 +376,14 @@ module LavinMQ mfile.pos = 4 mfile.unmap # will be mmap on demand if is_long_queue - @log.info { "Loaded #{counter}/#{@segments.size} segments" } if (counter &+= 1) % 128 == 0 + @log.info { "Loaded #{counter}/#{@segments.size} segments, #{@size} messages" } if (counter &+= 1) % 128 == 0 else - @log.debug { "Loaded #{counter}/#{@segments.size} segments" } if (counter &+= 1) % 128 == 0 + @log.debug { "Loaded #{counter}/#{@segments.size} segments, #{@size} messages" } if (counter &+= 1) % 128 == 0 end Fiber.yield @segment_msg_count[seg] = count end - @log.info { "Loaded #{counter} segments" } + @log.info { "Loaded #{counter} segments, #{@size} messages" } end private def update_stats_per_msg(seg, ts, bytesize)