Class JobLogWriter

java.lang.Object
com.kingsrook.qqq.backend.core.jobs.progress.JobLogWriter

public class JobLogWriter extends Object
One buffer/flusher per running chunk. Fencing and log pruning use an independent short transaction. WARN/ERROR are retained even when they alone exceed the cap.
  • Constructor Details

  • Method Details

    • withReclaimedChunk

      public JobLogWriter withReclaimedChunk(QRecord chunk)
      A reclaim reset must not overwrite a newly claimed attempt's live progress.
    • redact

      public static String redact(String message, DurableJobsMetaData settings)
      Apply mandatory rules and optional application rules to every displayed line.
    • append

      public void append(JobLogLevel level, String phase, String message)
      Buffer a line. The caller combines log and progress in a single flush.
    • append

      public void append(JobLogLevel level, String phase, String message, Integer chunkId, Integer attempt)
      Kernel lines can identify an interrupted attempt without its expired lease.
    • flush

      public boolean flush(JobProgressSnapshot snapshot, boolean force)
      Flush at most once per second, except phase changes, warnings, and chunk end.
    • progressValues

      public static Map<String,Serializable> progressValues(JobProgressSnapshot snapshot)
      Columns mirror the snapshot. Stored percent is an integer, rounded down.