From 2873befe536358634a69c544d61528eda4734d06 Mon Sep 17 00:00:00 2001 From: Vaibhav Kamra Date: Tue, 31 Jan 2023 19:57:19 -0800 Subject: [PATCH] Log collection updates (#2346) ## Description Adds a log message to collection updates to indicate how many items we have streamed into the repository ## Does this PR need a docs update or release note? - [ ] :white_check_mark: Yes, it's included - [ ] :clock1: Yes, but in a later PR - [x] :no_entry: No ## Type of change - [ ] :sunflower: Feature - [x] :bug: Bugfix - [ ] :world_map: Documentation - [ ] :robot: Test - [ ] :computer: CI/Deployment - [ ] :broom: Tech Debt/Cleanup ## Issue(s) * #2329 ## Test Plan - [x] :muscle: Manual - [ ] :zap: Unit test - [ ] :green_heart: E2E --- src/internal/observe/observe.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/internal/observe/observe.go b/src/internal/observe/observe.go index 2b86066f7..34da29331 100644 --- a/src/internal/observe/observe.go +++ b/src/internal/observe/observe.go @@ -390,6 +390,11 @@ func CollectionProgress( return } counted++ + + // Log every 1000 items that are processed + if counted%1000 == 0 { + log.Infow("uploading", "count", counted) + } } }(ch) @@ -435,6 +440,11 @@ func CollectionProgress( counted++ + // Log every 1000 items that are processed + if counted%1000 == 0 { + log.Infow("uploading", "count", counted) + } + bar.Increment() } }