Generate the URL before calling it, and log it