Output history in IntelliJ IDEA

Hi!

In my code I log useful information to system output using the following JAVA method: System.out.println(...).
Is it possible in IntelliJ IDEA to find a history of information that I wrote to output?

3 comments

One note - it's possible to keep output console within the same ide session. You can just pin it (see below) and it will be preserved:


pin.png
Denis

1

Console output is not retained between runs. It is one of the inherit shortcomings of console output. You need to use a logging framework in order to retain output between runs. (IDEA can display the output of a log in a tab in the run window if desired.) For a quick hit, you may want to look at the System Out and Err Redirected to SLF4J project that allows, with a single line of code (plus a log config file), all console output to be redirected to a Simple Logging Façade for Java (SLF4J) logger such as Logback. But in general, you'll find it most beneficial to switch to using a logging framework rather than System.out.

0

Pinning console saves output!

0

Please sign in to leave a comment.