Closed mmkal closed 1 month ago
Updated default logger.
Docs (from new readme):
JSON.stringify(___, null, 2)
So if the procedure returns ['one', 'two', 'three] this will be written to stdout:
['one', 'two', 'three]
one two three
If the procedure returns [{name: 'one'}, {name: 'two'}, {name: 'three'}] this will be written to stdout:
[{name: 'one'}, {name: 'two'}, {name: 'three'}]
{ "name": "one" } { "name": "two" } { "name": "three" }
This is to make it as easy as possible to use with other command line tools like xargs, jq etc. via bash-piping. If you don't want to rely on this logging, you can always log inside your procedures however you like and avoid returning a value.
xargs
jq
Updated default logger.
Docs (from new readme):
JSON.stringify(___, null, 2)
So if the procedure returns
['one', 'two', 'three]
this will be written to stdout:If the procedure returns
[{name: 'one'}, {name: 'two'}, {name: 'three'}]
this will be written to stdout:This is to make it as easy as possible to use with other command line tools like
xargs
,jq
etc. via bash-piping. If you don't want to rely on this logging, you can always log inside your procedures however you like and avoid returning a value.