qt5 - Where is located the qDebug qWarning qCritical and qFatal log by default on Qt? -
While running my Qt5 application on Linux, I do not see any output from qDebug, qWarning, qCritical or qFatal. That is, I can use the I just look at the QWarning log to see if there is any way to connect to the signal that is wrong, is there any way to see this log? A special command line option, an environment variable? I think I remember that before, everything was printed in stderr, maybe it's a QT5 change? do not mistake qDebug, qWarning, qCritical and qFatal always logging on standard error . This is not the case at all. The actual destination depends on QT configuration and targeting OS. Apart from this, 5.4 has introduced some practical changes to see and discuss. TL: DR: Qt> = 5.4: on Qt & lt; 5.4 , the situation is more confusing The problem with the pre-5.4 was that, if a program cuint is created with magazine support under the UI, Unix IDE, then the debug output of an application will not capture. The reason for this is that the production went to the magazine, not the IDE. In the 5.4 the approach has been made more flexible and similar in the OS. qInstallMsgHandler to install a message handler and view them, but it is rather heavy.
QT_LOGGING_TO_CONSOLE environment variable to
1 for.
QT_LOGGING_TO_CONSOLE environment variable
0 (this will force logging via the original system logger).
QT_LOGGING_TO_CONSOLE environment variable is not set , then logging in to the console or not depends on whether the application runs in TTY (on UNIX) Whether or not the console window (on Windows) is running or not.
Comments
Post a Comment