Statifier.Actions.LogAction (statifier v1.9.0)

View Source

Represents a <log> element in SCXML.

The <log> element is used to generate logging output. It has two optional attributes:

  • label: A string that identifies the source of the log entry
  • expr: An expression to evaluate and include in the log output

Per the SCXML specification, if neither label nor expr are provided, the element has no effect.

Summary

Functions

Executes the log action by evaluating the expression and logging the result.

Creates a new log action from parsed attributes.

Types

t()

@type t() :: %Statifier.Actions.LogAction{
  expr: String.t() | nil,
  label: String.t() | nil,
  source_location: map() | nil
}

Functions

execute(state_chart, log_action)

Executes the log action by evaluating the expression and logging the result.

new(attributes, source_location \\ nil)

@spec new(map(), map() | nil) :: t()

Creates a new log action from parsed attributes.