How to capture the output of riskscape

Is it possible to capture the progress statistics that are output while riskscape is running? (https://riskscape.org.nz/docs/reference/output/progress.html)
I am launching riskscape from inside another process and I would like to display these stats.

I have tried redirecting the output to file using

riskscape model run basic-exposure >> out.txt 2>&1

This stops the progress statistics from being shown on the command line but they do not appear in the file. The location of the final shape file output is shown however.

I know that I can display stats.txt once the run is finished but I would like to use this to monitor progress during the run.

The docs says that by default this is output to stats.txt. But you can change the path with --progress-indicator=[path]

E.g. riskscape model run basic-exposure --progress-indicator=out.txt

1 Like

That works perfectly thanks