How can I deal with this situation, I need to redirect stdout to a file, for example stdout.log , when the system starts.
Then configure IDEA Run/Debug Configurations - Logs to add the log file where stdout.log is located
That way, you can get the stdin newly created console and stderr on the old output.
source share