Skip to content

Log

Name Mandatory Description Default Type
⬅️ Input The value to be logged to the console. Any
Output ➡️ The same value that was inputted, unmodified. Any
Prefix No A prefix string to be added to the log message. none String
Level No The logging level to use. LogLevel::Info LogLevelVar(LogLevel)
Name No The name of the logger to use. shards StringVar(String)

Logs the output of a shard or the value of a variable to the console along with an optional prefix string (note that the system will add a : to the prefix). The logging level can be specified to control the verbosity of the log output.

Details

This shard is used for printing information to the console for debugging purposes.

It can log the output of a shard or the value of a variable. It can also prefix a message string to the logged output while displaying it in the console.

Examples

1
2
3
4
5
6
7
8
9
"I am a var" = var1
2 | Math.Multiply(4) | Log ; log previous shard output
var1 | Log ; log a variable value
3 | Math.Add(9) | Log(Prefix: "String") ; prefix a string to the logged output

"I am a var" = var2
2 | Math.Multiply(4) | Log(Level: LogLevel::Info) ; log previous shard output
var2 | Log(Level: LogLevel::Warning) ; log a variable value
3 | Math.Add(9) | Log(Prefix: "String" Level: LogLevel::Error)

[info] [sample-wire] 8
[info] [sample-wire] I am a var
[info] [sample-wire] String: 12
[info] [sample-wire] 8
[warning] [sample-wire] I am a var
[error] [sample-wire] String: 12