mirror of
https://github.com/owncloud/ocis.git
synced 2026-10-23 23:29:02 +03:00
fix(registry): stop logging every service re-registration RegisterService re-registers the service on a ticker so its TTL does not lapse, and logged a debug line carrying the whole service record on every tick. At the default 25s interval that is 3456 lines per registration per day, and this tree has 20 non-test callers, so an idle deployment at debug level writes tens of thousands of them with no user interaction at all. This is what the issue thread already agreed: only the error case is worth a log there. The error branch is untouched, so a refresh that fails still logs. The one-shot lines on first registration and on deregistration are untouched too, because they fire once per process rather than once per tick. The test runs against the in-memory registry and fails on the unmodified file. It lowers zerolog's global level first, because importing ocis-pkg/log raises it to fatal in init() and the assertion would otherwise pass on an empty buffer, and it requires the service to still resolve after more than one TTL so the absence of a line cannot be explained by a dead refresh loop. The three review fixups are folded in here rather than kept as separate commits: the changelog entry links the pull request ahead of the issue, and the explanatory comment in register.go was dropped in favour of this message. Closes #8274. Co-authored-by: Lukas Hirt <info@hirt.cz>