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.
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.
Source: https://www.jetbrains.com/help/idea/setting-log-options.html
In newer IntelliJ editions, starting with ~ year 2020, the setting has again visually moved. In addition to answer from @ahmednabil88:
In Run/Debug Configurations dialog: Modify options > Logs > Save console output to file
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.
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.
Specify the path to the file. If the file does not exist, it will be created automatically upon the first write.
Please note that at some point in 2018, this feature stopped working properly in IntelliJ for a number of users. As earlier answers to this question have indicated, IntelliJ's own documentation shows that it should be possible to write logs to a file.
There was a bug report filed with IntelliJ in 2018 that has still not been fixed. If you really need this feature, vote for it here to increase the chances that it gets fixed: https://youtrack.jetbrains.com/issue/IDEA-194934