QT_NO_DEBUG_OUTPUT doesn't silence QML console.debug()
Hi,
I am trying to control when qDebug() and console.debug() print their output to console, and it looks like a simple DEFINES += QT_NO_DEBUG_OUTPUT
is not enough. It does silence qDebug(), but console.debug() still prints to console, both on devices and SDK. In order to silence console.debug() output, I have to do the following in the main() function
// [...]
#ifdef QT_NO_DEBUG_OUTPUT
#include <QLoggingCategory>
#endif
int main(int argc, char *argv[])
{
#ifdef QT_NO_DEBUG_OUTPUT
// Disable QML debug level logging
QLoggingCategory::setFilterRules("*.debug=false");
#endif
// [...]
}
I don't find anything obvious in my .pro file, perhaps it comes from deeper somewhere? Should QT_NO_DEBUG_OUTPUT
have that effect in the first place?
I am using Sailfish Application SDK 3.0.7, and I tested this in the emulator, and with my Jolla Phone and Sony Xperia Z3 Compact Tablet running SFOS 3.2.1, too.
If nothing else, I hope this helps others, should they run into the same issue.
Thanks!