Stderr and stdout messages appear in the same console log in IntelliJ IDEA (typically in black and in red). Is there a simple way to suppress either stderr or stdout messages or redirect the two different streams to different console windows?
Different consoles for stderr and stdout in Intellij IDEA?
Asked Answered
How I deal with this situation is to redirect stdout
to a file, such as stdout.log
, when system begins.
Then Configuring IDEA's Run/Debug Configurations - Logs
to add a log file that locate stdout.log
Thus, you can get stdin
at console you just created and stderr
at old output.
There is this plugin called Grep Console which allows you to use regex agasint the console outputs. Thus, it is possible to filter the outputs per your needs.
I am aware of Grep Console. However, my output to stderr does not follow a particular pattern. Unfortunately, the legacy code in question duplicates output on stderr and stdout, which makes it rather hard to read. –
Twinkle
© 2022 - 2024 — McMap. All rights reserved.