View logs
When running your application, you can view the associated local log files in separate tabs of the Run or Debug tool window.
For IntelliJ IDEA to identify which logs to show, you need to specify them in the respective run/debug configuration.
Add a log
In the run/debug configuration that will be used for launching the app, click the Logs tab. The Edit Log Files Aliases table displays the list of log files.
Click Add .
Specify the log Alias (the name that will be displayed in the tool window tabs) and the path to the log file.
You can also specify an Ant pattern for the log path. In case several files of a rolling log match the pattern, the most recent one will be taken. If you want to track all the logs that match the pattern, select Show all files coverable by pattern.
Specify whether the corresponding tab should only show the new log entries using the Skip Content option.
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.
You can also specify an Ant pattern for the log path. In case several files of a rolling log match the pattern, the most recent one will be taken. If you want to track all the logs that match the pattern, select Show all files coverable by pattern.
Specify whether the corresponding tab should only show the new log entries using the Skip Content option.
When you have set up a log in the Logs section it will appear in a separate tab of the Run or Debug tool window whenever you run or debug the application.
If you don't need a log for some time, you can temporarily disable it by clearing its Is Active box.
Save console output to a file
If you use console output for logging, you can save it to a file for later inspection.
In the run/debug configuration that will be used for launching the app, click the Logs tab. The Edit Log Files Aliases table displays the list of log files.
Select Save console output to file Specify the path to the file. If the file does not exist, it will be created automatically upon the first write.
If you use console output for logging, you can save it to a file for later inspection.
In the run/debug configuration that will be used for launching the app, click Modify options. From the menu, select Save console output to file.
Specify the path to the file. If the file does not exist, it will be created automatically upon the first write.
Navigate to loggers
IntelliJ IDEA recognizes messages from common logging frameworks, such as slf4j and log4j2 and allows you to navigate to the corresponding logger calls from the console.
Logger links are marked with a dotted underline:
To turn this navigation off, clear the Process terminal output to find class names and highlight them in .