Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qlogging.cpp File Reference

(1025ff1bf4f6fe60431c16e7ceb73cce2d4b9464)

#include "qglobal_p.h"
#include "qlogging.h"
#include "qlogging_p.h"
#include "qlist.h"
#include "qbytearray.h"
#include "qscopeguard.h"
#include "qstring.h"
#include "qvarlengtharray.h"
#include "qdebug.h"
#include "qmutex.h"
#include <QtCore/private/qlocking_p.h>
#include "qloggingcategory.h"
#include "qelapsedtimer.h"
#include "qdeadlinetimer.h"
#include "qdatetime.h"
#include "qcoreapplication.h"
#include "qthread.h"
#include "private/qloggingregistry_p.h"
#include "private/qcoreapplication_p.h"
#include <qtcore_tracepoints_p.h>
#include <cstdlib>
#include <algorithm>
#include <memory>
#include <vector>
#include <stdio.h>
+ Include dependency graph for qlogging.cpp:

Go to the source code of this file.

Classes

struct  QMessagePattern
 

Namespaces

namespace  QtPrivate
 \macro QT_NO_KEYWORDS >
 

Macros

#define IF_TOKEN(LEVEL)
 
#define HANDLE_IF_TOKEN(LEVEL)
 

Functions

static QT_PREPEND_NAMESPACE (qint64) qt_gettid()
 
 Q_TRACE_POINT (qtcore, qt_message_print, int type, const char *category, const char *function, const char *file, int line, const QString &message)
 
template<typename String >
static Q_NORETURN void qt_message_fatal (QtMsgType, const QMessageLogContext &context, String &&message)
 \inmodule QtCore \title Qt Logging Types
 
static void qt_message_print (QtMsgType, const QMessageLogContext &context, const QString &message)
 
static void preformattedMessageHandler (QtMsgType type, const QMessageLogContext &context, const QString &formattedMessage)
 
static QString formatLogMessage (QtMsgType type, const QMessageLogContext &context, const QString &str)
 
static int checked_var_value (const char *varname)
 
static bool is_fatal_count_down (QAtomicInt &n)
 
static bool isFatal (QtMsgType msgType)
 
static bool systemHasStderr ()
 Returns true if writing to stderr is supported.
 
static bool stderrHasConsoleAttached ()
 Returns true if writing to stderr will end up in a console/terminal visible to the user.
 
bool QtPrivate::shouldLogToStderr ()
 Returns true if logging stderr should be ensured.
 
static Q_NEVER_INLINE void qt_message (QtMsgType msgType, const QMessageLogContext &context, const char *msg, va_list ap)
 
static bool isDefaultCategory (const char *category)
 
Q_AUTOTEST_EXPORT QByteArray qCleanupFuncinfo (QByteArray info)
 
static void qDefaultMessageHandler (QtMsgType type, const QMessageLogContext &context, const QString &buf)
 
static void stderr_message_handler (QtMsgType type, const QMessageLogContext &context, const QString &formattedMessage)
 
static bool grabMessageHandler ()
 
static void ungrabMessageHandler ()
 
template<typename String >
static void qt_message_fatal (QtMsgType, const QMessageLogContext &context, String &&message)
 
void qt_message_output (QtMsgType msgType, const QMessageLogContext &context, const QString &message)
 
void qErrnoWarning (const char *msg,...)
 
void qErrnoWarning (int code, const char *msg,...)
 
QtMessageHandler qInstallMessageHandler (QtMessageHandler h)
 
void qSetMessagePattern (const QString &pattern)
 
static void copyInternalContext (QInternalMessageLogContext *self, const QMessageLogContext &logContext) noexcept
 

Variables

static const char categoryTokenC [] = "%{category}"
 
static const char typeTokenC [] = "%{type}"
 
static const char messageTokenC [] = "%{message}"
 
static const char fileTokenC [] = "%{file}"
 
static const char lineTokenC [] = "%{line}"
 
static const char functionTokenC [] = "%{function}"
 
static const char pidTokenC [] = "%{pid}"
 
static const char appnameTokenC [] = "%{appname}"
 
static const char threadidTokenC [] = "%{threadid}"
 
static const char qthreadptrTokenC [] = "%{qthreadptr}"
 
static const char timeTokenC [] = "%{time"
 
static const char backtraceTokenC [] = "%{backtrace"
 
static const char ifCategoryTokenC [] = "%{if-category}"
 
static const char ifDebugTokenC [] = "%{if-debug}"
 
static const char ifInfoTokenC [] = "%{if-info}"
 
static const char ifWarningTokenC [] = "%{if-warning}"
 
static const char ifCriticalTokenC [] = "%{if-critical}"
 
static const char ifFatalTokenC [] = "%{if-fatal}"
 
static const char endifTokenC [] = "%{endif}"
 
static const char emptyTokenC [] = ""
 
static const char defaultPattern [] = "%{if-category}%{category}: %{endif}%{message}"
 
static Q_CONSTINIT QBasicAtomicPointer< void(QtMsgType, const QMessageLogContext &, const QString &) messageHandler ) = Q_BASIC_ATOMIC_INITIALIZER(nullptr)
 
static constexpr SystemMessageSink systemMessageSink
 

Macro Definition Documentation

◆ HANDLE_IF_TOKEN

#define HANDLE_IF_TOKEN ( LEVEL)
Value:
} else if (token == if##LEVEL##TokenC) { \
skip = type != Qt##LEVEL##Msg;
Token token
Definition keywords.cpp:444
Definition qcompare.h:63
GLenum type

◆ IF_TOKEN

#define IF_TOKEN ( LEVEL)
Value:
else if (lexeme == QLatin1StringView(LEVEL)) { \
if (inIf) \
nestedIfError = true; \
tokens[i] = LEVEL; \
inIf = true; \
}

Function Documentation

◆ checked_var_value()

static int checked_var_value ( const char * varname)
static

Definition at line 177 of file qlogging.cpp.

References QString::isEmpty(), ok, qgetenv(), str, and QString::toInt().

Referenced by isFatal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copyInternalContext()

static void copyInternalContext ( QInternalMessageLogContext * self,
const QMessageLogContext & logContext )
staticnoexcept

Definition at line 2334 of file qlogging.cpp.

References other().

+ Here is the call graph for this function:

◆ formatLogMessage()

static QString formatLogMessage ( QtMsgType type,
const QMessageLogContext & context,
const QString & str )
static

Definition at line 1581 of file qlogging.cpp.

References QCoreApplication::applicationName, QCoreApplication::applicationPid(), appnameTokenC, QString::asprintf(), QString::at(), backtraceTokenC, categoryTokenC, context, QDeadlineTimer::current(), QDateTime::currentDateTime(), QThread::currentThread(), Debug, endifTokenC, fileTokenC, QString::fromLatin1(), functionTokenC, HANDLE_IF_TOKEN, i, ifCategoryTokenC, Info, isDefaultCategory(), QString::isEmpty(), Qt::ISODate, lineTokenC, messageTokenC, QMessagePattern::mutex, QString::number(), pidTokenC, qCleanupFuncinfo(), QtCriticalMsg, QtDebugMsg, QtFatalMsg, qthreadptrTokenC, QtInfoMsg, QtWarningMsg, str, threadidTokenC, timeTokenC, token, toString(), and typeTokenC.

Referenced by qDefaultMessageHandler().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ grabMessageHandler()

static bool grabMessageHandler ( )
static

Definition at line 2055 of file qlogging.cpp.

Referenced by qt_message_print().

+ Here is the caller graph for this function:

◆ is_fatal_count_down()

static bool is_fatal_count_down ( QAtomicInt & n)
static

Definition at line 191 of file qlogging.cpp.

References qYieldCpu().

Referenced by isFatal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isDefaultCategory()

static bool isDefaultCategory ( const char * category)
static

Definition at line 934 of file qlogging.cpp.

References category().

Referenced by formatLogMessage(), and qt_message_print().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isFatal()

static bool isFatal ( QtMsgType msgType)
static

Definition at line 202 of file qlogging.cpp.

References checked_var_value(), is_fatal_count_down(), QtCriticalMsg, QtFatalMsg, and QtWarningMsg.

Referenced by MFPlayerSession::error(), MFPlayerControl::handleError(), qt_message(), and qt_message_output().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ preformattedMessageHandler()

static void preformattedMessageHandler ( QtMsgType type,
const QMessageLogContext & context,
const QString & formattedMessage )
static

Definition at line 2001 of file qlogging.cpp.

References context, QT_WARNING_DISABLE_GCC, QT_WARNING_POP, QT_WARNING_PUSH, stderr_message_handler(), and systemMessageSink.

Referenced by qDefaultMessageHandler(), and QMessagePattern::setPattern().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Q_TRACE_POINT()

Q_TRACE_POINT ( qtcore ,
qt_message_print ,
int type,
const char * category,
const char * function,
const char * file,
int line,
const QString & message )

◆ qCleanupFuncinfo()

Q_AUTOTEST_EXPORT QByteArray qCleanupFuncinfo ( QByteArray info)

Definition at line 942 of file qlogging.cpp.

References forever, info, and pos.

Referenced by formatLogMessage().

+ Here is the caller graph for this function:

◆ qDefaultMessageHandler()

static void qDefaultMessageHandler ( QtMsgType type,
const QMessageLogContext & context,
const QString & message )
static

Definition at line 2016 of file qlogging.cpp.

References context, formatLogMessage(), preformattedMessageHandler(), and systemMessageSink.

Referenced by qInstallMessageHandler(), and qt_message_print().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qErrnoWarning() [1/2]

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

Definition at line 2126 of file qlogging.cpp.

References context, qt_error_string(), qt_message_output(), QtWarningMsg, and QString::vasprintf().

Referenced by QBsdKeyboardHandler::QBsdKeyboardHandler(), QBsdMouseHandler::QBsdMouseHandler(), QEvdevTabletHandler::QEvdevTabletHandler(), QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(), QFbVtHandler::QFbVtHandler(), QMFRuntimeInit::QMFRuntimeInit(), QTsLibMouseHandler::QTsLibMouseHandler(), QtWaylandClient::QWaylandDisplay::QWaylandDisplay(), QtWaylandClient::QWaylandShmBuffer::QWaylandShmBuffer(), QWindowsFontEngine::QWindowsFontEngine(), QWindowsGLContext::QWindowsGLContext(), QWindowsMessageWindowClassContext::QWindowsMessageWindowClassContext(), QWindowsPipeReader::QWindowsPipeReader(), QWindowsPipeWriter::QWindowsPipeWriter(), QWinEventNotifierPrivate::QWinEventNotifierPrivate(), QEglFSKmsEglDeviceScreen::~QEglFSKmsEglDeviceScreen(), QMFRuntimeInit::~QMFRuntimeInit(), QWindowsFontEngine::~QWindowsFontEngine(), QWinSettingsPrivate::~QWinSettingsPrivate(), QWindowsFontEngineDirectWrite::addGlyphsToPath(), QWindowsRemovableDriveListener::addPath(), QInotifyFileSystemWatcherEngine::addPaths(), QWin32PrintEngine::begin(), QWindowsFontEngineDirectWrite::boundingBox(), QWindowsVistaStylePrivate::buffer(), QQC2::QWindowsXPStylePrivate::buffer(), byteArrayFromBuffer(), checkXdgRuntimeDir(), childKeysOrGroups(), QEglFSKmsEglDevice::close(), QWin32PrintEnginePrivate::composeGdiPath(), QEvdevMouseHandler::create(), QEvdevKeyboardHandler::create(), WindowCreationData::create(), QWindowsNativeFileDialogEventHandler::create(), ARB::createContext(), GDI::createContext(), createDummyGLContext(), QWindowsFontDatabase::createEngine(), QKmsDevice::createScreens(), QWindowsThemeCache::createTheme(), QQC2::QWindowsXPStylePrivate::createTheme(), deleteChildGroups(), QWin32PrintEngine::drawPixmap(), QWin32PrintEngine::drawTiledPixmap(), enableNonClientDpiScaling(), QWin32PrintEngine::end(), QEglFSKmsGbmScreen::ensureModeSet(), QBluetoothSocketPrivateWinRT::ensureNativeSocket(), QEglFSKmsGbmScreen::flip(), QWindowsBackingStore::flush(), QWindowsGeometryHint::frame(), QWindowsGeometryHint::frameOnPrimaryScreen(), getDiBits(), QWindowsFontEngineDirectWrite::getSfntTableData(), QWindowsFontEngineDirectWrite::getUnscaledGlyph(), QWindowsFontEngineDirectWrite::glyphIndex(), QFileSystemEngine::id(), imageFromWinHBITMAP_GetDiBits(), QWindowsOpengl32DLL::init(), QWindowsNativeFileDialogBase::init(), QIntegrityFbScreen::initialize(), QWin32PrintEnginePrivate::initialize(), QBsdFbScreen::initialize(), QLinuxFbScreen::initialize(), launchMail(), QWindowsGLContext::makeCurrent(), QWin32PrintEngine::newPage(), QGeoPositionInfoSourceWinRT::onPositionChanged(), SocketWorker::onReadyRead(), QEglFSKmsGbmDevice::open(), QEglFSKmsVsp2Device::open(), QLinuxFbDevice::open(), QEglFSMaliIntegration::platformInit(), QWindowsDirect2DWindow::present(), QEventDispatcherUNIX::processEvents(), ARB::qSurfaceFormatFromHDC(), qt_create_internal_window(), qt_imageToWinHBITMAP(), qt_report_error(), qt_report_pthread_error(), QEvdevTabletHandler::readData(), QEvdevTouchScreenHandler::readData(), QEvdevKeyboardHandler::readKeycode(), QEvdevMouseHandler::readMouseData(), QWindowsFontEngineDirectWrite::recalcAdvances(), QWindowsMimeRegistry::registerMimeType(), QEventDispatcherWin32Private::registerTimer(), QWindowsWindow::registerTouchWindow(), QWindowsClipboard::registerViewer(), QWindowsContext::registerWindowClass(), QWinSettingsPrivate::remove(), QWin32PrintEnginePrivate::resetDC(), QWindowsFileSystemWatcherEngineThread::run(), QWinSettingsPrivate::set(), QLinuxMediaDevice::OutputSubDevice::setFormat(), QLinuxMediaDevice::CaptureSubDevice::setFormat(), QWindowsClipboard::setMimeData(), QLinuxFbDevice::setMode(), QWindowsNativeFileDialogBase::setMode(), QLinuxMediaDevice::setSubdevAlpha(), QGeoPositionInfoSourceWinRT::setUpdateInterval(), QWindowsNativeFileDialogBase::shellItem(), QWindowsPipeWriter::stop(), QWindowsFontEngineDirectWrite::stringToCMap(), QLinuxFbDevice::swapBuffers(), QEglFSKmsEglDeviceScreen::waitForFlip(), and QEventDispatcherWin32::wakeUp().

+ Here is the call graph for this function:

◆ qErrnoWarning() [2/2]

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

Definition at line 2142 of file qlogging.cpp.

References context, qt_error_string(), qt_message_output(), QtWarningMsg, and QString::vasprintf().

+ Here is the call graph for this function:

◆ qInstallMessageHandler()

QtMessageHandler qInstallMessageHandler ( QtMessageHandler h)

Definition at line 2315 of file qlogging.cpp.

References messageHandler, and qDefaultMessageHandler().

Referenced by QDebugMessageServiceImpl::QDebugMessageServiceImpl(), QQmlTestMessageHandler::QQmlTestMessageHandler(), QErrorMessage::~QErrorMessage(), QQmlTestMessageHandler::~QQmlTestMessageHandler(), main(), QTest::messageHandler(), QErrorMessage::qtHandler(), QTestLog::startLogging(), QDebugMessageServiceImpl::stateChanged(), and QTestLog::stopLogging().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qSetMessagePattern()

void qSetMessagePattern ( const QString & pattern)

Definition at line 2325 of file qlogging.cpp.

References QMessagePattern::mutex.

Referenced by main().

+ Here is the caller graph for this function:

◆ qt_message()

static Q_NEVER_INLINE void qt_message ( QtMsgType msgType,
const QMessageLogContext & context,
const char * msg,
va_list ap )
static

Definition at line 374 of file qlogging.cpp.

References context, isFatal(), qt_message_fatal(), qt_message_print(), and QString::vasprintf().

Referenced by QMessageLogger::critical(), QMessageLogger::critical(), QMessageLogger::debug(), QMessageLogger::debug(), QMessageLogger::fatal(), QMessageLogger::fatal(), QMessageLogger::info(), QMessageLogger::warning(), and QMessageLogger::warning().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qt_message_fatal() [1/2]

template<typename String >
static Q_NORETURN void qt_message_fatal ( QtMsgType ,
const QMessageLogContext & context,
String && message )
static

\inmodule QtCore \title Qt Logging Types

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 {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:

if (!driver()->isOpen() || driver()->isOpenError()) {
qWarning("QSqlQuery::exec: database not open");
return false;
}

Referenced by qt_message(), and qt_message_output().

+ Here is the caller graph for this function:

◆ qt_message_fatal() [2/2]

template<typename String >
static void qt_message_fatal ( QtMsgType ,
const QMessageLogContext & context,
String && message )
static

Definition at line 2085 of file qlogging.cpp.

References context, Q_UNUSED, qAbort(), and ret.

+ Here is the call graph for this function:

◆ qt_message_output()

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

Definition at line 2118 of file qlogging.cpp.

References context, isFatal(), qt_message_fatal(), and qt_message_print().

Referenced by qErrnoWarning(), and qErrnoWarning().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qt_message_print()

static void qt_message_print ( QtMsgType msgType,
const QMessageLogContext & context,
const QString & message )
static

Definition at line 2059 of file qlogging.cpp.

References context, QLoggingCategory::defaultCategory(), grabMessageHandler(), isDefaultCategory(), messageHandler, Q_TRACE, qDefaultMessageHandler(), qScopeGuard(), qt_message_print(), QtFatalMsg, stderr_message_handler(), and ungrabMessageHandler().

Referenced by qt_message(), qt_message_output(), and qt_message_print().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ QT_PREPEND_NAMESPACE()

static QT_PREPEND_NAMESPACE ( qint64 )
static

Definition at line 114 of file qlogging.cpp.

References QThread::currentThreadId().

+ Here is the call graph for this function:

◆ stderr_message_handler()

static void stderr_message_handler ( QtMsgType type,
const QMessageLogContext & context,
const QString & formattedMessage )
static

Definition at line 1956 of file qlogging.cpp.

References context, and Q_UNUSED.

Referenced by preformattedMessageHandler(), and qt_message_print().

+ Here is the caller graph for this function:

◆ stderrHasConsoleAttached()

static bool stderrHasConsoleAttached ( )
static

Returns true if writing to stderr will end up in a console/terminal visible to the user.

This is typically the case if the application was started from the command line.

If the application is started without a controlling console/terminal, but the parent process reads stderr and presents it to the user in some other way, the parent process may override the detection in this function by setting the QT_ASSUME_STDERR_HAS_CONSOLE environment variable to 1.

Note
Qt Creator does not implement a pseudo TTY, nor does it launch apps with the override environment variable set, but it will read stderr and print it to the user, so in effect this function cannot be used to conclude that stderr output will not be visible to the user, as even if this function returns false, the output might still end up visible to the user. For this reason, we don't guard the stderr output in the default message handler with stderrHasConsoleAttached().
See also
systemHasStderr()

Definition at line 253 of file qlogging.cpp.

References _PATH_TTY, qEnvironmentVariableIntValue(), qt_safe_close(), qt_safe_open(), stderrHasConsoleAttached(), and systemHasStderr().

Referenced by QtPrivate::shouldLogToStderr(), and stderrHasConsoleAttached().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ systemHasStderr()

static bool systemHasStderr ( )
static

Returns true if writing to stderr is supported.

See also
stderrHasConsoleAttached()

Definition at line 226 of file qlogging.cpp.

Referenced by stderrHasConsoleAttached().

+ Here is the caller graph for this function:

◆ ungrabMessageHandler()

static void ungrabMessageHandler ( )
static

Definition at line 2056 of file qlogging.cpp.

Referenced by qt_message_print().

+ Here is the caller graph for this function:

Variable Documentation

◆ appnameTokenC

const char appnameTokenC[] = "%{appname}"
static

Definition at line 1115 of file qlogging.cpp.

Referenced by formatLogMessage(), and QMessagePattern::setPattern().

◆ backtraceTokenC

const char backtraceTokenC[] = "%{backtrace"
static

Definition at line 1119 of file qlogging.cpp.

Referenced by formatLogMessage(), and QMessagePattern::setPattern().

◆ categoryTokenC

const char categoryTokenC[] = "%{category}"
static

Definition at line 1108 of file qlogging.cpp.

Referenced by formatLogMessage(), and QMessagePattern::setPattern().

◆ defaultPattern

const char defaultPattern[] = "%{if-category}%{category}: %{endif}%{message}"
static

Definition at line 1129 of file qlogging.cpp.

Referenced by QMessagePattern::QMessagePattern().

◆ emptyTokenC

const char emptyTokenC[] = ""
static

Definition at line 1127 of file qlogging.cpp.

Referenced by QMessagePattern::setPattern().

◆ endifTokenC

const char endifTokenC[] = "%{endif}"
static

Definition at line 1126 of file qlogging.cpp.

Referenced by formatLogMessage(), and QMessagePattern::setPattern().

◆ fileTokenC

const char fileTokenC[] = "%{file}"
static

Definition at line 1111 of file qlogging.cpp.

Referenced by formatLogMessage(), and QMessagePattern::setPattern().

◆ functionTokenC

const char functionTokenC[] = "%{function}"
static

Definition at line 1113 of file qlogging.cpp.

Referenced by formatLogMessage(), and QMessagePattern::setPattern().

◆ ifCategoryTokenC

const char ifCategoryTokenC[] = "%{if-category}"
static

Definition at line 1120 of file qlogging.cpp.

Referenced by formatLogMessage(), and QMessagePattern::setPattern().

◆ ifCriticalTokenC

const char ifCriticalTokenC[] = "%{if-critical}"
static

Definition at line 1124 of file qlogging.cpp.

Referenced by QMessagePattern::setPattern().

◆ ifDebugTokenC

const char ifDebugTokenC[] = "%{if-debug}"
static

Definition at line 1121 of file qlogging.cpp.

Referenced by QMessagePattern::setPattern().

◆ ifFatalTokenC

const char ifFatalTokenC[] = "%{if-fatal}"
static

Definition at line 1125 of file qlogging.cpp.

Referenced by QMessagePattern::setPattern().

◆ ifInfoTokenC

const char ifInfoTokenC[] = "%{if-info}"
static

Definition at line 1122 of file qlogging.cpp.

Referenced by QMessagePattern::setPattern().

◆ ifWarningTokenC

const char ifWarningTokenC[] = "%{if-warning}"
static

Definition at line 1123 of file qlogging.cpp.

Referenced by QMessagePattern::setPattern().

◆ lineTokenC

const char lineTokenC[] = "%{line}"
static

Definition at line 1112 of file qlogging.cpp.

Referenced by formatLogMessage(), and QMessagePattern::setPattern().

◆ messageHandler

◆ messageTokenC

const char messageTokenC[] = "%{message}"
static

Definition at line 1110 of file qlogging.cpp.

Referenced by formatLogMessage(), and QMessagePattern::setPattern().

◆ pidTokenC

const char pidTokenC[] = "%{pid}"
static

Definition at line 1114 of file qlogging.cpp.

Referenced by formatLogMessage(), and QMessagePattern::setPattern().

◆ qthreadptrTokenC

const char qthreadptrTokenC[] = "%{qthreadptr}"
static

Definition at line 1117 of file qlogging.cpp.

Referenced by formatLogMessage(), and QMessagePattern::setPattern().

◆ systemMessageSink

constexpr SystemMessageSink systemMessageSink
staticconstexpr
Initial value:
= {
nullptr
}

Definition at line 1979 of file qlogging.cpp.

Referenced by preformattedMessageHandler(), and qDefaultMessageHandler().

◆ threadidTokenC

const char threadidTokenC[] = "%{threadid}"
static

Definition at line 1116 of file qlogging.cpp.

Referenced by formatLogMessage(), and QMessagePattern::setPattern().

◆ timeTokenC

const char timeTokenC[] = "%{time"
static

Definition at line 1118 of file qlogging.cpp.

Referenced by formatLogMessage(), and QMessagePattern::setPattern().

◆ typeTokenC

const char typeTokenC[] = "%{type}"
static

Definition at line 1109 of file qlogging.cpp.

Referenced by formatLogMessage(), and QMessagePattern::setPattern().