LogWatcher implements PodEventHandler, Closeable { public static boolean shouldWatchLogs(Map<String, String> startOptions) { if (startOptions == null || startOptions.isEmpty()) { return false; } return Boolean.parseBoolean( startOptions.getOrDefault(DEBUG_WORKSPACE_START, Boolean.FALSE.toString())); } LogWatcher(
      KubernetesClientFactory clientFactory,
      RuntimeEventsPublisher eventsPublisher,
      String workspaceId,
      String namespace,
      Set<String> podsOfInterest,
      Executor executor,
      LogWatchTimeouts timeouts,
      long inputStreamLimit); void addLogHandler(PodLogHandler handler); @Override void handle(PodEvent event); void close(); void close(boolean needWait); @Override String toString(); static long getLogLimitBytes(Map<String, String> startOptions); static boolean shouldWatchLogs(Map<String, String> startOptions); static final Long DEFAULT_LOG_LIMIT_BYTES; }
@Test(dataProvider = "shouldWatchLogsData") public void testShouldWatchLogsFromStartOptions( Map<String, String> startOptions, boolean expected) { assertEquals(LogWatcher.shouldWatchLogs(startOptions), expected); }