Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure IntelliJ to print the standard output in the console window but also save it to file

How can I configure IntelliJ to capture the standard output of the application to a file, but still display it in the standard console window?

like image 453
Grzenio Avatar asked Nov 14 '11 12:11

Grzenio


People also ask

How do I save my console output 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. If the file does not exist, it will be created automatically upon the first write.

How do I get output window in IntelliJ?

Run tool window The Run tool window displays output generated by your application. If you are running multiple applications, each one is displayed in a tab named after the run/debug configuration applied. If you re-run an application, the new output overwrites the contents of the tab.

How do I print a statement in IntelliJ?

In IDEA, you can type sout and press Tab to generate System. out. println automatically.

Where is console window in IntelliJ?

Opening a Terminal Window We can open the terminal window with ⌥F12 on macOS, or Alt+F12 on Windows and Linux. The terminal supports all the same commands that the operating system supports. and press enter.


2 Answers

This feature is available starting from IntelliJ IDEA 11:

save log

like image 64
CrazyCoder Avatar answered Sep 20 '22 15:09

CrazyCoder


This feature does work in IDEA 14.1.1. Also in Run/Debug configuration.

enter image description here

The writing occurs after the run finishes.

like image 31
Sophia Feng Avatar answered Sep 19 '22 15:09

Sophia Feng