code: public void fetchLogs() {
          try {
              callback.open();
              this.request = getLogRequest(false);
              final HttpResponse response = client.execute(request);
              parseResponse(response);
          } catch (LogCallback.DoneException e) {
              // Signifies we're finished with the log stream.
          } catch (IOException exp) {
              callback.error(exp.getMessage());
          } finally {
              callback.close();
          }
      }
docs: Get logs and feed a callback with the content