QtBase
v6.3.1
|
The QMessageLogger class generates log messages. More...
#include <qlogging.h>
Public Attributes | |
void void Q_DECL_COLD_FUNCTION void Q_DECL_COLD_FUNCTION void typedef const QLoggingCategory &(* | CategoryFunction )() |
The QMessageLogger class generates log messages.
\inmodule QtCore
QMessageLogger is used to generate messages for the Qt logging framework. Usually one uses it through qDebug(), qInfo(), qWarning(), qCritical, or qFatal() functions, which are actually macros: For example qDebug() expands to QMessageLogger(FILE, LINE, Q_FUNC_INFO).debug() for debug builds, and QMessageLogger(0, 0, 0).debug() for release builds.
One example of direct use is to forward errors that stem from a scripting language, e.g. QML:
Definition at line 92 of file qlogging.h.
|
inlineconstexpr |
Definition at line 96 of file qlogging.h.
|
inlineconstexpr |
Definition at line 97 of file qlogging.h.
|
inlineconstexpr |
Definition at line 99 of file qlogging.h.
QDebug QMessageLogger::critical | ( | ) | const |
Logs a critical message using a QDebug stream
Definition at line 825 of file qlogging.cpp.
Q_DECL_COLD_FUNCTION QDebug QMessageLogger::critical | ( | CategoryFunction | catFunc | ) | const |
void void void void Q_DECL_COLD_FUNCTION void Q_DECL_COLD_FUNCTION void Q_DECL_COLD_FUNCTION void Q_DECL_COLD_FUNCTION void QMessageLogger::critical | ( | CategoryFunction | catFunc, |
const char * | msg, | ||
... | |||
) | const |
Logs a critical message specified with format msg. Additional parameters, specified by msg, may be used.
Definition at line 756 of file qlogging.cpp.
QDebug QMessageLogger::critical | ( | const QLoggingCategory & | cat | ) | const |
Logs a critical message into category cat using a QDebug stream.
Definition at line 839 of file qlogging.cpp.
void QMessageLogger::critical | ( | const QLoggingCategory & | cat, |
const char * | msg, | ||
... | |||
) | const |
Logs a critical message specified with format msg for the context cat. Additional parameters, specified by msg, may be used.
Definition at line 774 of file qlogging.cpp.
QDebug QMessageLogger::debug | ( | ) | const |
Logs a debug message using a QDebug stream
Definition at line 481 of file qlogging.cpp.
QDebug QMessageLogger::debug | ( | CategoryFunction | catFunc | ) | const |
void void QMessageLogger::debug | ( | CategoryFunction | catFunc, |
const char * | msg, | ||
... | |||
) | const |
Logs a debug message specified with format msg. Additional parameters, specified by msg, may be used.
Definition at line 377 of file qlogging.cpp.
QDebug QMessageLogger::debug | ( | const QLoggingCategory & | cat | ) | const |
Logs a debug message into category cat using a QDebug stream.
Definition at line 495 of file qlogging.cpp.
void QMessageLogger::debug | ( | const QLoggingCategory & | cat, |
const char * | msg, | ||
... | |||
) | const |
Logs a debug message specified with format msg for the context cat. Additional parameters, specified by msg, may be used.
Definition at line 429 of file qlogging.cpp.
Logs a fatal message specified with format msg. Additional parameters, specified by msg, may be used.
Definition at line 872 of file qlogging.cpp.
QDebug QMessageLogger::info | ( | ) | const |
Logs an informational message using a QDebug stream.
Definition at line 593 of file qlogging.cpp.
QDebug QMessageLogger::info | ( | CategoryFunction | catFunc | ) | const |
QDebug QMessageLogger::info | ( | const QLoggingCategory & | cat | ) | const |
Logs an informational message into the category cat using a QDebug stream.
Definition at line 607 of file qlogging.cpp.
void QMessageLogger::info | ( | const QLoggingCategory & | cat, |
const char * | msg, | ||
... | |||
) | const |
Logs an informational message specified with format msg for the context cat. Additional parameters, specified by msg, may be used.
Definition at line 540 of file qlogging.cpp.
|
noexcept |
Definition at line 526 of file qlogging.cpp.
QDebug QMessageLogger::warning | ( | ) | const |
Logs a warning message using a QDebug stream
Definition at line 709 of file qlogging.cpp.
Q_DECL_COLD_FUNCTION QDebug QMessageLogger::warning | ( | CategoryFunction | catFunc | ) | const |
void void void void Q_DECL_COLD_FUNCTION void Q_DECL_COLD_FUNCTION void QMessageLogger::warning | ( | CategoryFunction | catFunc, |
const char * | msg, | ||
... | |||
) | const |
Logs a warning message specified with format msg. Additional parameters, specified by msg, may be used.
Definition at line 640 of file qlogging.cpp.
QDebug QMessageLogger::warning | ( | const QLoggingCategory & | cat | ) | const |
Logs a warning message into category cat using a QDebug stream.
Definition at line 722 of file qlogging.cpp.
void QMessageLogger::warning | ( | const QLoggingCategory & | cat, |
const char * | msg, | ||
... | |||
) | const |
Logs a warning message specified with format msg for the context cat. Additional parameters, specified by msg, may be used.
Definition at line 658 of file qlogging.cpp.
QMessageLogger::CategoryFunction |
This is a typedef for a pointer to a function with the following signature:
The Q_DECLARE_LOGGING_CATEGORY
macro generates a function declaration with this signature, and Q_LOGGING_CATEGORY
generates its definition.
Definition at line 111 of file qlogging.h.