Add logging like in exchange backup path (#4710)

Log both the given limits and the effective limits so we can figure out if something went wrong.

---

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No

#### Type of change

- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [x] 🤖 Supportability/Tests
- [ ] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Test Plan

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
ashmrtn 2023-11-17 22:21:08 -08:00 committed by GitHub
parent fd91d36c91
commit a777359abe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -787,6 +787,10 @@ type pagerLimiter struct {
limits control.PreviewItemLimits
}
func (l pagerLimiter) effectiveLimits() control.PreviewItemLimits {
return l.limits
}
func (l pagerLimiter) enabled() bool {
return l.limits.Enabled
}
@ -863,7 +867,10 @@ func (c *Collections) PopulateDriveCollections(
)
ctx = clues.Add(ctx, "invalid_prev_delta", invalidPrevDelta)
logger.Ctx(ctx).Infow("running backup with limiter", "limiter", limiter)
logger.Ctx(ctx).Infow(
"running backup",
"limits", c.ctrl.PreviewLimits,
"effective_limits", limiter.effectiveLimits())
if !invalidPrevDelta {
maps.Copy(newPrevPaths, oldPrevPaths)