Logs search terms and their request via a called function