Skip to content

Log

Name - Description Default Type
<input> Any
<output> Any
Prefix The message to prefix to the logged output. "" String
Level The level of logging. LogLevel.Info LogLevel

Logs the output of a shard or the value of a variable to the console (along with an optional prefix string).

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
"I am a var" = .var
(* 2 4) (Log) ;; log previous shard output
.var (Log)  ;; log a variable value
(+ 3 9) (Log :Prefix "String") ;; prefix a string to the logged output
[info] [shards/General/Log/1.edn] 8
[info] [shards/General/Log/1.edn] I am a var
[info] [shards/General/Log/1.edn] String: 12

 

1
2
3
4
"I am a var" = .var
(* 2 4) (Log :Level LogLevel.Info) ;; log previous shard output
.var (Log :Level LogLevel.Warning)  ;; log a variable value
(+ 3 9) (Log :Prefix "String" :Level LogLevel.Error) ;; prefix a string to the logged output
[info] [shards/General/Log/2.edn] 8
[warning] [shards/General/Log/2.edn] I am a var
[error] [shards/General/Log/2.edn] String: 12