ropensci / drake

An R-focused pipeline toolkit for reproducibility and high-performance computing
https://docs.ropensci.org/drake
GNU General Public License v3.0
1.34k stars 128 forks source link

Turn off spinner for console-logging #1341

Closed feinmann closed 3 years ago

feinmann commented 3 years ago

Hi there, I am using {drake} with _drake.R-file and r_make().

When I set drake_config(..., verbose = 1L), there still remains a spinner in the console-output, which makes my console-logging using sink("file", split = TRUE) quite crowded.

My question: would it be possible to turn the spinner off? Or is there another possibility to log the console-output? I have quite a lot targets with messages and they are pretty verbose in the console and I would like to save this output as a kind of log. Other solutions would also be great. Of course it is possible to delete the rows later, but maybe there is a better way?

Thank you very much for this great package. Kind regards

wlandau commented 3 years ago

You can manually disable the spinner with r_make(r_args = list(spinner = FALSE)). r_args is a list of named arguments to r_fn in r_make() (callr::r() by default). Alternatively, if you run the pipeline in batch mode instead of interactive mode (i.e. interactive() is FALSE) then the spinner will automatically turn off.