Description
Print is a container functor that prints messages to the application console around the execution of the functors it contains: an optional message before running its content, and an optional message after. It causes side effects (writing to the log/console) and otherwise simply runs its contained functors like any other container.
Optional Inputs
| Name | Type | Description |
|---|---|---|
| Initial Message | String Type | Message printed before the container's content is executed. Nullable; the default value is none (nothing is printed). |
| Final Message | String Type | Message printed after the container's content is executed. Nullable; the default value is none (nothing is printed). |
| Log Level | Log Tag Type | The log level used to print both messages — for example, distinguishing a normal progress message from an error message. The default value is Unconditional. |
Outputs
This functor has no output ports; it acts through the side effect of printing to the console.
Group
Notes
Execution order
The initial message, if defined, is printed before the contained functors run; the final message, if defined, is printed only after all contained functors have finished running. Both messages are printed using the same logLevel.
Recommended usage
Using Print without any contained functors is not advised — with nothing inside to order its execution against, when the message is actually printed relative to the rest of the model becomes unspecified.
String formatting
Print has no string-formatting capabilities of its own. To build a formatted or composite message (embedding a computed value, for example), assemble the string first with Create String and connect its result into Initial Message or Final Message; some types are also automatically converted to String when connected directly.
Internal Name
Print