summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qlogging.cpp
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-09-16 16:14:59 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2022-09-21 14:00:44 +0200
commitbee606b0916e58de4a6783d2c96a0ed70fe914ed (patch)
tree38112b29633e37c489c024e9254ecdd1a8496fca /src/corelib/global/qlogging.cpp
parentd5395219b93d3ad5fc69d3a7a043f06ab7fb8f29 (diff)
Extract overview page for QtLogging header from QtGlobal docs
Task-number: QTBUG-106154 Change-Id: I7a60225bc8d848f52c3f51f8f4d0a360cb4ea744 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qlogging.cpp')
-rw-r--r--src/corelib/global/qlogging.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index 01ca949204b..1c469d28fb8 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -129,6 +129,36 @@ QT_BEGIN_NAMESPACE
using namespace Qt::StringLiterals;
+/*!
+ \headerfile <QtLogging>
+ \inmodule QtCore
+ \title Qt Logging Types
+
+ \brief The <QtLogging> header file defines Qt logging types, functions
+ and macros.
+
+ The <QtLogging> header file contains several types, functions and
+ macros for logging.
+
+ The QtMsgType enum identifies the various messages that can be generated
+ and sent to a Qt message handler; QtMessageHandler is a type definition for
+ a pointer to a function with the signature
+ \c {void myMessageHandler(QtMsgType, const QMessageLogContext &, const char *)}.
+ qInstallMessageHandler() function can be used to install the given
+ QtMessageHandler. QMessageLogContext class contains the line, file, and
+ function the message was logged at. This information is created by the
+ QMessageLogger class.
+
+ <QtLogging> also contains functions that generate messages from the
+ given string argument: qDebug(), qInfo(), qWarning(), qCritical(),
+ and qFatal(). These functions call the message handler
+ with the given message.
+
+ Example:
+
+ \snippet code/src_corelib_global_qglobal.cpp 4
+*/
+
#if !defined(Q_CC_MSVC)
Q_NORETURN
#endif