IntelliJ IDEA 2021.3 Help

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

  1. 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.

  2. Click Add the Add button.

  3. 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.

  4. Specify whether the corresponding tab should only show the new log entries using the Skip Content option.

Add a log

  1. 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.

  2. In the table that opens, click Add.

  3. 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.

  4. 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.

  1. 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.

  2. 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.

Save console output to a file

If you use console output for logging, you can save it to a file for later inspection.

  1. 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.

  2. Specify the path to the file. If the file does not exist, it will be created automatically upon the first write.

Last modified: 05 October 2021