Skip to content

Msg

Name Mandatory Description Default Type
⬅️ Input The input is ignored. This shard displays a static message. Any
Output ➡️ The same variable that was inputted, unmodified. Any
Message No The message to display on the user's screen or console. none StringVar(String)
Raw No Ignore all other formatting and output the message as-is. none Bool
Level No The logging level to use. LogLevel::Info LogLevelVar(LogLevel)
Name No The name of the logger to use. shards StringVar(String)

Displays the passed message string to the user via standard output. The input variable is ignored, and only the static message is displayed.

Details

This shard is used for displaying messages to the user on the standard output (which is usually the console).

The message to display can be passed to this shard either as a string or as a variable holding a value. In case a variable is passed the shard displays the variable's value.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
@template(msgshard [a b] {
  Msg(a) ; print value of 1st arg passed
  Msg(b) ; print value of 2nd arg passed
})

Msg("Hello World") ; prints string
@msgshard("Bye" "Universe") ; prints args passed

@template(msgshard2 [a b] {
  Msg(a Level: LogLevel::Warning) ; print value of 1st arg passed
  Msg(b Level: LogLevel::Error) ; print value of 2nd arg passed
})

Msg("Hello World" Level: LogLevel::Info) ; prints string
@msgshard2("Bye" "Universe") ; prints args passed

[info] [sample-wire] Hello World
[info] [sample-wire] Bye
[info] [sample-wire] Universe
[info] [sample-wire] Hello World
[warning] [sample-wire] Bye
[error] [sample-wire] Universe