better log formatting for standalone mode
added parse_url() function to simplify url manipulation