Can we redirect the output of Canton Console to a file?

Like this in the terminal:

echo "hello world" > hello.txt

Try these for further guidance as the Ammonite REPL is what the Canton Console really is:

Hope this helps, BM.

1 Like

Hi @gyorgybalazsi :wave:

I tried this and it worked for me:


@ import java.io.{File, FileOutputStream}
import java.io.{File, FileOutputStream}

@ val fos = new FileOutputStream(new File("<ENTER FILE PATH/NAME>"))
fos: FileOutputStream = java.io.FileOutputStream@1a67bde5

@ Console.withOut(fos) { println(health.status) }


@
2 Likes

Thank you!