consolidate code for parsing/validating log URL