Class PluginTaskLogSink

java.lang.Object
com.xebialabs.xlrelease.domain.tasks.plugin.PluginTaskLogSink

public final class PluginTaskLogSink extends Object
Host-side live log sink for PluginTask.

Streams log() output to TaskExecutionLogService in chunks while the task executes. One instance per execution, shared for all log calls (stdout/stderr simulation).

Implements the shape from the old RemoteScript pipeline but fixes the documented bugs, seeds the chunk counter from the repository, and is thread-safe for log(String).

  • Constructor Details

    • PluginTaskLogSink

      public PluginTaskLogSink(com.xebialabs.xlrelease.scheduler.logs.TaskExecutionLogService taskExecutionLogService, String taskId, String executionId, int failuresCount, int initialChunk, Duration pollingInterval, ScheduledExecutorService executor)
  • Method Details

    • log

      public void log(String line)
      Thread-safe append for live streaming. Never throws: logging is best effort.
    • flushAndClose

      public void flushAndClose()
      Called by worker at end of execute for final flush. Idempotent. A failed buffer is never replayed: a partial store may already have happened, so retrying could duplicate or reorder.