In Eclipse it\'s possible to redirect console output to a log file using the method outlined here.
Is there a similar feature in IntelliJ IDEA?
Considering the scenario, where you want to capture the log obtained on console via System.out.println("log info") , you could import the following classes :
import java.io.FileOutputStream;
import java.io.PrintStream;
and set the output stream to a file like this:
System.setOut(new PrintStream(new FileOutputStream("log_file.txt")));
This will redirect all the text to the file named log_file.txt . You could also go through this tutorial. Hope this helps. :)