Different consoles for stderr and stdout in Intellij IDEA?
Asked Answered
T

2

17

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?

Twinkle answered 15/4, 2016 at 9:51 Comment(0)
C
2

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.

Cyanic answered 4/12, 2017 at 6:39 Comment(0)
E
0

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.

Evangelin answered 15/4, 2016 at 10:34 Comment(1)
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.