Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qlogging.h File Reference

(469367dc08654e02dae39162750fce7fa39d906d)

#include <QtCore/qtclasshelpermacros.h>
#include <QtCore/qtconfigmacros.h>
#include <QtCore/qtcoreexports.h>
#include <QtCore/qcontainerfwd.h>
+ Include dependency graph for qlogging.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  QMessageLogContext
 \inmodule QtCore More...
 
class  QMessageLogger
 \inmodule QtCore More...
 

Macros

#define QT_MESSAGE_LOGGER_NORETURN   Q_NORETURN
 
#define QT_MESSAGELOGCONTEXT
 
#define QT_MESSAGELOG_FILE   static_cast<const char *>(__FILE__)
 
#define QT_MESSAGELOG_LINE   __LINE__
 
#define QT_MESSAGELOG_FUNC   static_cast<const char *>(Q_FUNC_INFO)
 
#define qDebug   QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC).debug
 [1]
 
#define qInfo   QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC).info
 
#define qWarning   QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC).warning
 
#define qCritical   QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC).critical
 
#define qFatal   QMessageLogger(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC).fatal
 
#define QT_NO_QDEBUG_MACRO   while (false) QMessageLogger().noDebug
 

Typedefs

typedef void(* QtMessageHandler) (QtMsgType, const QMessageLogContext &, const QString &)
 

Enumerations

enum  QtMsgType { QtDebugMsg , QtWarningMsg , QtCriticalMsg , QtFatalMsg }
 

Functions

Q_CORE_EXPORT void qt_message_output (QtMsgType, const QMessageLogContext &context, const QString &message)
 
Q_CORE_EXPORT Q_DECL_COLD_FUNCTION void qErrnoWarning (int code, const char *msg,...)
 
Q_CORE_EXPORT Q_DECL_COLD_FUNCTION void qErrnoWarning (const char *msg,...)
 
Q_CORE_EXPORT QtMessageHandler qInstallMessageHandler (QtMessageHandler)
 
Q_CORE_EXPORT void qSetMessagePattern (const QString &messagePattern)
 
Q_CORE_EXPORT QString qFormatLogMessage (QtMsgType type, const QMessageLogContext &context, const QString &buf)
 
Q_DECL_COLD_FUNCTION Q_CORE_EXPORT QString qt_error_string (int errorCode=-1)
 

Macro Definition Documentation

◆ qCritical

Definition at line 168 of file qlogging.h.

◆ qDebug

[1]

[7]

[15]

[11]

[toString]

[12] [13] [14]

[16] [16] [17]

[8]

Definition at line 165 of file qlogging.h.

◆ qFatal

Definition at line 169 of file qlogging.h.

◆ qInfo

Definition at line 166 of file qlogging.h.

◆ QT_MESSAGE_LOGGER_NORETURN

#define QT_MESSAGE_LOGGER_NORETURN   Q_NORETURN

Definition at line 69 of file qlogging.h.

◆ QT_MESSAGELOG_FILE

#define QT_MESSAGELOG_FILE   static_cast<const char *>(__FILE__)

Definition at line 156 of file qlogging.h.

◆ QT_MESSAGELOG_FUNC

#define QT_MESSAGELOG_FUNC   static_cast<const char *>(Q_FUNC_INFO)

Definition at line 158 of file qlogging.h.

◆ QT_MESSAGELOG_LINE

#define QT_MESSAGELOG_LINE   __LINE__

Definition at line 157 of file qlogging.h.

◆ QT_MESSAGELOGCONTEXT

#define QT_MESSAGELOGCONTEXT

Definition at line 151 of file qlogging.h.

◆ QT_NO_QDEBUG_MACRO

#define QT_NO_QDEBUG_MACRO   while (false) QMessageLogger().noDebug

Definition at line 171 of file qlogging.h.

◆ qWarning

Definition at line 167 of file qlogging.h.

Typedef Documentation

◆ QtMessageHandler

typedef void(* QtMessageHandler) (QtMsgType, const QMessageLogContext &, const QString &)

Definition at line 192 of file qlogging.h.

Enumeration Type Documentation

◆ QtMsgType

enum QtMsgType
Enumerator
QtDebugMsg 
QtWarningMsg 
QtCriticalMsg 
QtFatalMsg 

Definition at line 29 of file qlogging.h.

Function Documentation

◆ qErrnoWarning() [1/2]

Q_CORE_EXPORT Q_DECL_COLD_FUNCTION void qErrnoWarning ( const char * msg,
... )

Definition at line 2130 of file qlogging.cpp.

◆ qErrnoWarning() [2/2]

Q_CORE_EXPORT Q_DECL_COLD_FUNCTION void qErrnoWarning ( int code,
const char * msg,
... )

Definition at line 2146 of file qlogging.cpp.

◆ qFormatLogMessage()

Q_CORE_EXPORT QString qFormatLogMessage ( QtMsgType type,
const QMessageLogContext & context,
const QString & buf )

◆ qInstallMessageHandler()

Q_CORE_EXPORT QtMessageHandler qInstallMessageHandler ( QtMessageHandler h)

Definition at line 2319 of file qlogging.cpp.

◆ qSetMessagePattern()

Q_CORE_EXPORT void qSetMessagePattern ( const QString & messagePattern)

Definition at line 2329 of file qlogging.cpp.

◆ qt_error_string()

QString qt_error_string ( int errorCode = -1)

Definition at line 151 of file qsystemerror.cpp.

◆ qt_message_output()

Q_CORE_EXPORT void qt_message_output ( QtMsgType msgType,
const QMessageLogContext & context,
const QString & message )

Definition at line 2122 of file qlogging.cpp.