Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to redirect console output to a log file in IntelliJ like Eclipse?

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?

like image 357
rmcc Avatar asked Jan 19 '11 13:01

rmcc


People also ask

How do I redirect console output to a file in IntelliJ?

Save console output to a fileIn the run/debug configuration that will be used for launching the app, click Modify options. From the menu, select Save console output to file. Specify the path to the file.

How do I redirect Eclipse console output to a file in Windows?

The first method is to tell Eclipse to save console output to a file. For that, go to Run → Debug Configurations on Eclipse menu. Then under Standard Input and Output section, click on checkbox next to File: , and choose the name of output file to use.


1 Answers

UPDATE: this feature is available in IDEA 11.

Not possible in IDEA at the moment, I've submitted a new feature request. Feel free to vote.

A workaround could be implemented using wrapper class with main() method which will redirect stdout and stderr to files and then run the main class of your application.

like image 91
CrazyCoder Avatar answered Oct 24 '22 09:10

CrazyCoder