public static String convertToStr(RestRequest restRequest) {
    if (Objects.isNull(restRequest)) {
      return "RestRequest: null";
    }
    StringBuilder sb = new StringBuilder();
    sb.append("RestRequest: [");
    sb.append("Method: " + ((restRequest.getRestMethod() == null) ? "null" : restRequest.getRestMethod().name()));
    sb.append(", Path: " + ((restRequest.getPath() == null) ? "null" : restRequest.getPath()));
    sb.append(", Uri: " + ((restRequest.getUri() == null) ? "null" : restRequest.getUri()));
    Account account = null;
    try {
      account = RestUtils.getAccountFromArgs(restRequest.getArgs());
    } catch (RestServiceException restServiceException) {
    }
    sb.append(", Account: " + ((account == null) ? "null" : account.toString()));
    Container container = null;
    try {
      container = RestUtils.getContainerFromArgs(restRequest.getArgs());
    } catch (RestServiceException restServiceException) {
    }
    sb.append(", Container: " + ((container == null) ? "null" : container.toString()));
    sb.append("]");
    return sb.toString();
  }
Convert the specified {@link RestRequest} object to a string representation.
@param restRequest {@link RestRequest} object.
@return String representation of the {@link RestRequest} object.
ambry-api/src/main/java/com/github/ambry/rest/RestUtils.java