add response code and message to log