Can we redirect the output of Canton Console to a file?
App Development4 posts165 views3 likesLast activity Mar 2024
GY
gyorgybalazsiOP
Jan 2024Like this in the terminal:
echo "hello world" > hello.txt
BE
Ben_M
Mar 2024Try these for further guidance as the Ammonite REPL is what the Canton Console really is:
Hope this helps, BM.
RO
rohitt
Mar 2024I 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) }
@
GY
gyorgybalazsi
Mar 2024Thank you!