QtBase  v6.3.1
Classes | Macros | Typedefs | Enumerations | Functions
qlogging.h File Reference
#include <QtCore/qglobal.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
 The QMessageLogContext class provides additional information about a log message. More...
 
class  QMessageLogger
 The QMessageLogger class generates log messages. More...
 

Macros

#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] More...
 
#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 ,
  QtInfoMsg , QtSystemMsg = QtCriticalMsg
}
 

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)
 

Macro Definition Documentation

◆ qCritical

Definition at line 180 of file qlogging.h.

◆ qDebug

[1]

[15]

[11]

[toString]

[12] [13] [14]

[16] [16] [17]

Definition at line 177 of file qlogging.h.

◆ qFatal

Definition at line 181 of file qlogging.h.

◆ qInfo

Definition at line 178 of file qlogging.h.

◆ QT_MESSAGELOG_FILE

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

Definition at line 168 of file qlogging.h.

◆ QT_MESSAGELOG_FUNC

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

Definition at line 170 of file qlogging.h.

◆ QT_MESSAGELOG_LINE

#define QT_MESSAGELOG_LINE   __LINE__

Definition at line 169 of file qlogging.h.

◆ QT_MESSAGELOGCONTEXT

#define QT_MESSAGELOGCONTEXT

Definition at line 163 of file qlogging.h.

◆ QT_NO_QDEBUG_MACRO

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

Definition at line 183 of file qlogging.h.

◆ qWarning

Definition at line 179 of file qlogging.h.

Typedef Documentation

◆ QtMessageHandler

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

Definition at line 204 of file qlogging.h.

Enumeration Type Documentation

◆ QtMsgType

enum QtMsgType
Enumerator
QtDebugMsg 
QtWarningMsg 
QtCriticalMsg 
QtFatalMsg 
QtInfoMsg 
QtSystemMsg 

Definition at line 60 of file qlogging.h.

Function Documentation

◆ qErrnoWarning() [1/2]

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

◆ qErrnoWarning() [2/2]

Q_CORE_EXPORT Q_DECL_COLD_FUNCTION void qErrnoWarning ( int  code,
const char *  msg,
  ... 
)
Here is the caller graph for this function:

◆ qFormatLogMessage()

Q_CORE_EXPORT QString qFormatLogMessage ( QtMsgType  type,
const QMessageLogContext context,
const QString buf 
)
Here is the caller graph for this function:

◆ qInstallMessageHandler()

Q_CORE_EXPORT QtMessageHandler qInstallMessageHandler ( QtMessageHandler  )
Here is the caller graph for this function:

◆ qSetMessagePattern()

Q_CORE_EXPORT void qSetMessagePattern ( const QString messagePattern)
Here is the caller graph for this function:

◆ qt_message_output()

Q_CORE_EXPORT void qt_message_output ( QtMsgType  ,
const QMessageLogContext context,
const QString message 
)
Here is the caller graph for this function: