I'd like to have a situational suppressing of `run...
# bolt
d
I'd like to have a situational suppressing of
run_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:
Copy code
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.
Copy code
$ 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
Copy code
$ 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
Copy code
$ 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