IntelliJ IDEA 2023.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.

    Adding log aliases on Logs tab in run configuration
  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.

  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.

    Run config show log newui
  2. In the table that opens, click Add.

    Adding log aliases in run configuration
  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.

    Saving console output to 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.

    Saving 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: 19 March 2024