QMessageLogContext Class

The QMessageLogContext class provides additional information about a log message. 更多...

頭: #include <QMessageLogContext>
qmake: QT += core
Since: Qt 5.0

詳細描述

The QMessageLogContext class provides additional information about a log message.

The class provides information about the source code location a qDebug (), qInfo (), qWarning (), qCritical () 或 qFatal () message was generated.

注意: By default, this information is recorded only in debug builds. You can overwrite this explicitly by defining QT_MESSAGELOGCONTEXT or QT_NO_MESSAGELOGCONTEXT .

另請參閱 QMessageLogger , QtMessageHandler ,和 qInstallMessageHandler ().