you can use this:
FileOutputStream fos = null;
try {
fos = new FileOutputStream("D:/logCloner.txt");
} catch(FileNotFoundException e) {
// TODO Auto-generated catch block
ivy.log.error(e);
}
// Create new print stream for file.
PrintStream ps = new PrintStream(fos);
// Set file print stream.
System.setOut(ps);
System.out.println("Print in the file !!");
I tested in my Ivy desinger - workedworked
![alt text][1]
[1]: https://answers.axonivy.com/upfiles/Screenshot_2.png