We should be able to loop through Logs like we do HiddenServiceDir?
Maybe we'll need to do that after we've parsed Logs into log objects.
I'll see if I can write some code for it.
One challenge with looping over logs is that we only want to look at the filenames. We'd also want to look at filenames inside FooPort options
My eventual hope with Logs and Ports is that we can reuse the control-command parsing code in control_cmd.c to break them into their own options objects, and handle those with the regular configuration processing code.
Do you think that, for now, we might be able to take this patch as a straightforward refactoring, and add additional checks in a separate branch? For me it is a blocker for #30866 (moved), and I'd like to get that straightened out.
(Rationale for proceeding: I believe that this branch is a strict improvement over Tor's current behavior, doesn't introduce technical debt, and unblocks #30866 (moved). If you don't agree, we shouldn't proceed.)