Added logging to the grade endpoint.