Skip to content

Commit 9bba561

Browse files
authored
Merge pull request #5 from SenseUnit/log_no_of_entries
Log no of entries in group
2 parents c02f307 + ecd269a commit 9bba561

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

output/log.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ func (o *Log) dump() {
7878
var report strings.Builder
7979
fmt.Fprintln(&report, "Groups snapshot:")
8080
for _, gid := range o.bridge.Groups() {
81-
fmt.Fprintf(&report, " - Group %d (%s):\n", gid, readinessLabels[o.bridge.GroupReady(gid)])
82-
for _, item := range o.bridge.ListGroup(gid) {
81+
grpItems := o.bridge.ListGroup(gid)
82+
fmt.Fprintf(&report, " - Group %d (%s, %d entries):\n", gid, readinessLabels[o.bridge.GroupReady(gid)], len(grpItems))
83+
for _, item := range grpItems {
8384
fmt.Fprintf(&report, " - %s (till %v)\n", item.Address().Unmap().String(), item.ExpiresAt())
8485
}
8586
}

0 commit comments

Comments
 (0)