@Override
  public List<LogEntry> listLog(UUID subscriptionId, String serviceName)
      throws AzureCmdException, ParseException {
    String[] cmd =
        new String[] {
          "mobile", "log", "--json", "-s", subscriptionId.toString(), serviceName,
        };

    String json = AzureCommandHelper.getInstance().consoleExec(cmd);

    CustomJsonSlurper slurper = new CustomJsonSlurper();

    Map<String, Object> results = (Map<String, Object>) slurper.parseText(json);
    List<Map<String, String>> tempRes = (List<Map<String, String>>) results.get("results");

    List<LogEntry> res = new ArrayList<LogEntry>();
    for (Map<String, String> item : tempRes) {
      LogEntry logEntry = new LogEntry();

      logEntry.setMessage(item.get("message"));
      logEntry.setSource(item.get("source"));
      logEntry.setType(item.get("type"));

      SimpleDateFormat ISO8601DATEFORMAT =
          new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.ENGLISH);
      logEntry.setTimeCreated(ISO8601DATEFORMAT.parse(item.get("timeCreated")));

      res.add(logEntry);
    }

    return res;
  }