10.3. Gather logs in QGIS

If a problem occurs, it’s important to have full information on what was going on in the program at the time. To provide the support team with this information you can use logs and debug messages.

10.3.1. Log messages

To view the Messages panel click on the grey speech bubble icon in the bottom right corner of the QGIS window. Messages are grouped into several tabs, some of them are general, others give more details about specific plugins.

../../_images/messages_panel_en.png

Pic. 10.4. Messages panel is activated

10.3.2. Capture outgoing requests in QGIS

This functionality is used for debugging and in case of errors while working with Web services.

The target action is the action that immediately precedes the error or incorrect app behavior. For example, in NextGIS Connect plugin it can be clicking on the “Add to QGIS” button. To get additional debug information:

  1. Make sure that all related plugins are updated to the latest version and your app is updated to the latest LTR or higher.

  2. Launch QGIS.

  3. Activate “Debugging/Developpment Tools” panel. You can do it from the main menu: View –> Panels —> Debugging/Developpment Tools.

  4. Go to the network_and_proxy Nextwork Logger tab and click button with a red circle to turn on log recording.

  5. Open the other tool panels that you need etc.

  6. Reproduce the actions leading to the Target action (see above), but do not perform the Target action itself.

  7. In the Debugging/Development Tools click red trash can to wipe the log clean.

  8. Perform the Target action, wait for the error to reproduce.

  9. Save the log by clicking mActionFileSave in the Debugging/Development Tools panel and send it to support@nextgis.com. If it’s the first time you write about the problem, add detailed description (How to make an efficient bug report).

../../_images/debug_panel_en.png

Pic. 10.5. Capturing QGIS network logs

10.3.3. Capturing GDAL logs for QGIS on Windows

Some logs, namely those of GDAL, cannot be recorded by the in-built debugging tools of QGIS. But you can record them if you run QGIS from the command prompt.

  1. Open the folder that has qgis-bin.exe in it. The path is something like c:\Program Files\QGIS 3.42.3\bin\qgis-bin.exe.

  2. In that folder open the Command Console.

If you’re working in Total Commander, open the TC as administrator, find the folder, type cmd and press Enter.

../../_images/tc_cmd_en.png

Pic. 10.6. Opening Command Console from Total Commander

If you don’t have Total Commander, go to Start - type cmd and select the Command Prompt app - run as administrator.

In the app, go to the QGIS bin folder by typing cd+the path, for example:

cd c:\Program Files\QGIS 3.42.3\bin\

../../_images/cmd_qgis_folder.png

Pic. 10.7. Navigating to the QGIS folder in Command Console

  1. In the command prompt run:

set CPL_DEBUG=ON qgis-bin.exe >> log.txt 2>&1

It creates a file log.txt

  1. Open QGIS and reproduce the error.

  2. Send the log.txt file to support@nextgis.com.