dm
10/05/2023, 12:08 PMrun_command
result output but still using info logging, because it contains a lot of data in stdout. I don't know if I'm writing the plan wrong or my usage of bolt plan run
is wrong:
plan base::test {
without_default_logging() || {
log::info('Hello')
run_command('echo "Imagine a lot of data"', 'localhost')
log::info('World')
}
}
Whatever I do as bolt plan run arguments combination, either I see both or none.
$ bolt plan run base::test --no-verbose --log-level info
Starting: plan base::test
Starting: plan base::test
Hello
Running command 'echo "Imagine a lot of data"' on ["localhost"]
Starting: command 'echo "Imagine a lot of data"' on localhost
{"target":"localhost","action":"command","object":"echo \"Imagine a lot of data\"","status":"success","value":{"stdout":"Imagine a lot of data\n","stderr":"","merged_output":"Imagine a lot of data\n","exit_code":0}}
Finished: command 'echo "Imagine a lot of data"' with 0 failures in 0.01 sec
World
Finished: plan base::test in 0.02 sec
Finished: plan base::test in 0.02 sec
Plan completed successfully with no result
$ bolt plan run base::test --no-verbose
Starting: plan base::test
Finished: plan base::test in 0.01 sec
Plan completed successfully with no result
$ bolt plan run base::test --verbose
Starting: plan base::test
Finished: plan base::test in 0.01 sec
Plan completed successfully with no result
I dont mind the lines logging starting, running, finished command. I just try to avoid the line containing stdout