How to enable log message in QGIS? debug mode or verbose mode.

I put variable in my env but without success.

More informations to complete this question:

I would like to see messages of detail the transaction between QGIS and database. I'm another problem with QGIS see my another post my idea is discovery more informations to understand the cause of this problem. To me is important enable debug mode in QGIS or enable high level logs.


2 Answers 2


define in your OS this environment variables

 export CPL_DEBUG=ON
 export CPL_LOG=/tmp/log_qgis.log

I believe the method described by rbarbalho is now obsolete.

I found that one needs to set the following environment variables:


Some debug levels (or maybe all?) will not be logged if running a standard installation. These levels are only available if you compile your own version, using CMAKE_BUILD_TYPE=Debug.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.