From 466e0dff4bb686e51d0ab3f905631fcb7dd8bfef Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 19 Sep 2013 17:15:43 +0200 Subject: Add tracing to logging framework MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I4d5b9a24a214785019ff1238c1790ead79205b15 Reviewed-by: Leena Miettinen Reviewed-by: Topi Reiniƶ Reviewed-by: Robin Burchell Reviewed-by: Thiago Macieira Reviewed-by: Shawn Rutledge --- src/corelib/global/qglobal.cpp | 4 ++++ src/corelib/global/qlogging.cpp | 1 + src/corelib/global/qlogging.h | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 59bdecc868..e2b1502a8e 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -717,6 +717,10 @@ Q_CORE_EXPORT void *qMemSet(void *dest, int c, size_t n); A message generated by the qCritical() function. \value QtFatalMsg A message generated by the qFatal() function. + \value QtTraceMsg + Used by the qCTrace() macro. Trace events are usually passed only + to dedicated \a QTracer objects, and do not appear in the installed + message handler. \value QtSystemMsg diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 4d564b09c3..c0709ce258 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -814,6 +814,7 @@ Q_CORE_EXPORT QString qMessageFormatString(QtMsgType type, const QMessageLogCont case QtWarningMsg: message.append(QLatin1String("warning")); break; case QtCriticalMsg:message.append(QLatin1String("critical")); break; case QtFatalMsg: message.append(QLatin1String("fatal")); break; + case QtTraceMsg: message.append(QLatin1String("trace")); break; } } else if (token == fileTokenC) { if (context.file) diff --git a/src/corelib/global/qlogging.h b/src/corelib/global/qlogging.h index 2b798f9ea0..68a24d0397 100644 --- a/src/corelib/global/qlogging.h +++ b/src/corelib/global/qlogging.h @@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE class QDebug; class QNoDebug; -enum QtMsgType { QtDebugMsg, QtWarningMsg, QtCriticalMsg, QtFatalMsg, QtSystemMsg = QtCriticalMsg }; +enum QtMsgType { QtDebugMsg, QtWarningMsg, QtCriticalMsg, QtFatalMsg, QtTraceMsg, QtSystemMsg = QtCriticalMsg }; class QMessageLogContext { -- cgit v1.2.3