code: private void ajaxFetchExecFlowLogs(final HttpServletRequest req,
        final HttpServletResponse resp, final HashMap<String, Object> ret, final User user,
        final ExecutableFlow exFlow) throws ServletException {
      final long startMs = System.currentTimeMillis();
      final Project project = getProjectAjaxByPermission(ret, exFlow.getProjectId(), user, Type.READ);
      if (project == null) {
        return;
      }
  
      final int offset = this.getIntParam(req, "offset");
      final int length = this.getIntParam(req, "length");
  
      resp.setCharacterEncoding("utf-8");
  
      try {
        final LogData data = this.executorManagerAdapter.getExecutableFlowLog(exFlow, offset, length);
        ret.putAll(appendLogData(data, offset));
  
      } catch (final ExecutorManagerException e) {
        throw new ServletException(e);
      }
  
      /*
       * We originally consider leverage Drop Wizard's Timer API {@link com.codahale.metrics.Timer}
       * to measure the duration time.
       * However, Timer will result in too many accompanying metrics (e.g., min, max, 99th quantile)
       * regarding one metrics. We decided to use gauge to do that and monitor how it behaves.
       */
      this.webMetrics.setFetchLogLatency(System.currentTimeMillis() - startMs);
    }
docs: Gets the logs through plain text stream to reduce memory overhead.