use of org.eclipse.che.workspace.infrastructure.kubernetes.namespace.log.LogWatcher in project che-server by eclipse-che.
the class KubernetesDeployments method watchLogs.
/**
* Start watching the logs of this deployment.
*
* @param handler is processing log messages
* @param podNames pods of interest for watching the logs
*/
public synchronized void watchLogs(PodLogHandler handler, RuntimeEventsPublisher eventsPublisher, LogWatchTimeouts timeouts, Set<String> podNames, long limitInputStreamBytes) throws InfrastructureException {
if (logWatcher == null) {
LOG.debug("start watching logs of pods '{}' of workspace '{}'", podNames, workspaceId);
logWatcher = new LogWatcher(clientFactory, eventsPublisher, workspaceId, namespace, podNames, executor, timeouts, limitInputStreamBytes);
logWatcher.addLogHandler(handler);
watchEvents(logWatcher);
} else {
LOG.debug("Already watching logs of workspace [{}], just adding log handler", workspaceId);
logWatcher.addLogHandler(handler);
}
}
use of org.eclipse.che.workspace.infrastructure.kubernetes.namespace.log.LogWatcher in project devspaces-images by redhat-developer.
the class KubernetesDeployments method watchLogs.
/**
* Start watching the logs of this deployment.
*
* @param handler is processing log messages
* @param podNames pods of interest for watching the logs
*/
public synchronized void watchLogs(PodLogHandler handler, RuntimeEventsPublisher eventsPublisher, LogWatchTimeouts timeouts, Set<String> podNames, long limitInputStreamBytes) throws InfrastructureException {
if (logWatcher == null) {
LOG.debug("start watching logs of pods '{}' of workspace '{}'", podNames, workspaceId);
logWatcher = new LogWatcher(clientFactory, eventsPublisher, workspaceId, namespace, podNames, executor, timeouts, limitInputStreamBytes);
logWatcher.addLogHandler(handler);
watchEvents(logWatcher);
} else {
LOG.debug("Already watching logs of workspace [{}], just adding log handler", workspaceId);
logWatcher.addLogHandler(handler);
}
}
Aggregations