java.lang.Object
com.scivicslab.turingworkflow.plugins.logdb.LogEntry

public class LogEntry extends Object
Represents a single log entry recorded during workflow execution.

Each entry captures the timestamp, originating node, log level, message, and optional action metadata such as exit code and duration. Entries are immutable once created.

Since:
1.0
Author:
devteam@scivicslab.com
  • Constructor Details

    • LogEntry

      public LogEntry(long id, long sessionId, LocalDateTime timestamp, String nodeId, String label, String actionName, LogLevel level, String message, Integer exitCode, Long durationMs)
      Constructs a new log entry with all fields.
      Parameters:
      id - the unique database ID
      sessionId - the session ID this entry belongs to
      timestamp - the timestamp when this entry was recorded
      nodeId - the identifier of the originating node
      label - the workflow label/step, may be null
      actionName - the action or method name, may be null
      level - the log severity level
      message - the log message text
      exitCode - the process exit code, may be null
      durationMs - the execution duration in milliseconds, may be null
  • Method Details

    • getId

      public long getId()
      Returns:
      the unique database ID of this log entry
    • getSessionId

      public long getSessionId()
      Returns:
      the session ID this entry belongs to
    • getTimestamp

      public LocalDateTime getTimestamp()
      Returns:
      the timestamp when this entry was recorded
    • getNodeId

      public String getNodeId()
      Returns:
      the identifier of the node that generated this entry
    • getLabel

      public String getLabel()
      Returns:
      the workflow label/step, or null
    • getActionName

      public String getActionName()
      Returns:
      the action or method name, or null
    • getLevel

      public LogLevel getLevel()
      Returns:
      the severity level of this log entry
    • getMessage

      public String getMessage()
      Returns:
      the log message text
    • getExitCode

      public Integer getExitCode()
      Returns:
      the process exit code, or null if not applicable
    • getDurationMs

      public Long getDurationMs()
      Returns:
      the execution duration in milliseconds, or null if not applicable
    • toString

      public String toString()
      Returns a human-readable string representation of this log entry.

      The format includes the ISO 8601 timestamp, level, optional label/action, message, non-zero exit code, and duration if present.

      Overrides:
      toString in class Object
      Returns:
      formatted log entry string