Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij Idea, how persist console output to file programmatically?

Is there a way to tell IntelliJ where to store the output info by coding?
I'm making a plugin and don't know how to save the output, because I need the local path for it.

like image 637
Leonardo Eras Avatar asked Sep 25 '17 17:09

Leonardo Eras


2 Answers

  1. Go to Run/Debug Configuration
  2. Click the "Logs" tab
  3. Check the "Save console output to file" box and select the output directory.
  4. Apply/OK

Source: https://www.jetbrains.com/help/idea/setting-log-options.html

like image 73
Strikegently Avatar answered Sep 19 '22 04:09

Strikegently


Official UPDATE from IntelliJ help page:
For the New appearance

Save console output to a file
If you use console output for logging, you can save it to a file for later inspection.

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

  2. Specify the path to the file. If the file does not exist, it will be created automatically upon the first write.

like image 45
ahmednabil88 Avatar answered Sep 17 '22 04:09

ahmednabil88