Skip to content

Commit e1990ed

Browse files
committed
Only log polling info every 10th attempt to avoid flooding logs for large catalogs.
1 parent 786a89a commit e1990ed

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Modules/Sources/Yosemite/Tools/POS/POSCatalogFullSyncService.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,10 @@ private extension POSCatalogFullSyncService {
161161
}
162162
return downloadURL
163163
case .pending, .processing:
164-
DDLogInfo("🟣 Catalog request \(response.status)... (attempt \(attempts + 1)/\(maxAttempts))")
164+
// Only logs every 10th attempt to avoid flooding logs for large catalogs.
165+
if attempts % 10 == 0 {
166+
DDLogInfo("🟣 Catalog request \(response.status)... (attempt \(attempts + 1)/\(maxAttempts))")
167+
}
165168
try await Task.sleep(nanoseconds: 1_000_000_000) // 1 second
166169
attempts += 1
167170
case .failed:

0 commit comments

Comments
 (0)