Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Different consoles for stderr and stdout in Intellij IDEA?

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?

like image 790
Stefan Haberl Avatar asked Apr 15 '16 09:04

Stefan Haberl


People also ask

How do I add console to IntelliJ?

To create a console, use one of the following actions in the Database tool window (View | Tool Windows | Database). Click a data source and select File | New | Query Console. Right-click a data source and select New | Query Console. Click a data source, press Alt+Insert , and select Query Console.

Where we can see the console in IntelliJ?

js application, IntelliJ IDEA shows two console tabs in the Debug tool window - Process Console and Debugger Console.

How do I get full console log in IntelliJ?

In the run/debug configuration that will be used for launching the app, click Modify options. From the menu, select Specify logs to be shown in console. In the table that opens, click Add. Specify the log Alias (the name that will be displayed in the tool window tabs) and the path to the log file.


1 Answers

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.

like image 196
SLKun Avatar answered Sep 29 '22 21:09

SLKun