Skip to content

Commit

Permalink
Log number of messages loaded (#848)
Browse files Browse the repository at this point in the history
  • Loading branch information
spuun authored Nov 18, 2024
1 parent 53173a5 commit 10527ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lavinmq/amqp/queue/message_store.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 10527ee

Please sign in to comment.