Class LogEntry
java.lang.Object
com.scivicslab.turingworkflow.plugins.logdb.LogEntry
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 IDsessionId- the session ID this entry belongs totimestamp- the timestamp when this entry was recordednodeId- the identifier of the originating nodelabel- the workflow label/step, may benullactionName- the action or method name, may benulllevel- the log severity levelmessage- the log message textexitCode- the process exit code, may benulldurationMs- the execution duration in milliseconds, may benull
-
-
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
- Returns:
- the timestamp when this entry was recorded
-
getNodeId
- Returns:
- the identifier of the node that generated this entry
-
getLabel
- Returns:
- the workflow label/step, or
null
-
getActionName
- Returns:
- the action or method name, or
null
-
getLevel
- Returns:
- the severity level of this log entry
-
getMessage
- Returns:
- the log message text
-
getExitCode
- Returns:
- the process exit code, or
nullif not applicable
-
getDurationMs
- Returns:
- the execution duration in milliseconds, or
nullif not applicable
-
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.
-