code: void startup() {
  
          logger.info("Logger startup: " + this);
  
          new Thread(() -> {
              try {
                  String path = "pods/" + pod.getName() + "/log?follow=true";
                  URL url = new URL(Context.getBaseUrl() + "/" + path);
                  HttpURLConnection urlConnection = (HttpURLConnection)url.openConnection();
                  HttpHelper helper = new HttpHelper(urlConnection);
                  Map<String, String> requestHeaders = new HashMap<>();
                  requestHeaders.put("Authorization", "Bearer " + Context.getServiceToken());
                  helper.setHeaders(requestHeaders);
  
                  HttpConnection connection = helper.getConnection();
                  connection.prepare("GET");
                  byte[] buffer = new byte[2048];
                  in = urlConnection.getInputStream();
                  File logFile = getFile();
                  out = new FileOutputStream(logFile, true);
                  while (!isTerminating) {
                      int bytesRead = in.read(buffer);
                      if (bytesRead == -1) {
                          logger.warn("Logger: " + this + " terminating due to EOF");
                          terminate();
                      }
                      else {
                          out.write(buffer, 0, bytesRead);
                          out.flush();
                          if (logFile.length() > maxBytes) {
                              out.close();
                              Files.copy(logFile.toPath(), new File(logFile + ".old").toPath(), StandardCopyOption.REPLACE_EXISTING);
                              Files.write(logFile.toPath(), new byte[0], StandardOpenOption.TRUNCATE_EXISTING);
                              out = new FileOutputStream(logFile, true);
                          }
                      }
                  }
              }
              catch (IOException ex) {
                  logger.severeException(ex.getMessage(), ex);
              }
              finally {
                  shutdown();
              }
          }).start();
      }
docs: 10 MB