`show_messages=FALSE` only suppresses `stderr`
A request that's come up in the BDA course is the ability to supress all output from a $sample() run. At the moment, the best that can be done with show_messages=FALSE and refresh=0 is:
Running MCMC with 4 sequential chains...
Chain 1 finished in 0.1 seconds.
Chain 2 finished in 0.1 seconds.
Chain 3 finished in 0.1 seconds.
Chain 4 finished in 0.1 seconds.
All 4 chains finished successfully.
Mean chain execution time: 0.1 seconds.
Total execution time: 0.8 seconds.
Which I believe is because show_messages doesn't suppress stdout as well. Could be good to either add that as part of the behaviour of show_messages or to add an additional setting to supress all output
I think what we want to do is rethink logging and make a "logging" argument that behaves something along these lines:
- default TRUE -> log everything
- FALSE -> log nothing at all
- "exceptions-only -> show cmdstan exceptions
- "progress-only" -> show progress and end timings only.
This is a duplicate of https://github.com/stan-dev/cmdstanr/issues/646, but we can keep it as I think this has to be done sooner rather than later :)
I agree this would be nice. I like @rok-cesnovar's logging idea.
Should we close this now that #746 was merged a while ago and we have show_exceptions? Or do we still want to eventually add a "logging" argument? If the latter we can keep this open.
Closing this since we have #746. If we want to add additional logging features (I'm open to that) we can open new issues.