Log collection cleanups
What does this MR do?
Various cleanups. Things I ran into while working on the linked issue.
Why was this MR needed?
To make the code a bit better.
What's the best way to test this MR?
What are the relevant issue numbers?
Relates to https://gitlab.com/gitlab-com/request-for-help/-/work_items/3960+.