QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
QGCLoggingCategory.h File Reference
#include <QtCore/QLoggingCategory>
#include <QtCore/QStringList>
#include <functional>
Include dependency graph for QGCLoggingCategory.h:

Go to the source code of this file.

Classes

class  QGCLoggingCategory
 Process-wide catalogue of unique category names, independent of application services. More...

Macros

#define QGC_LOGGING_CATEGORY(name, categoryStr)
#define QGC_LOGGING_CATEGORY_ON(name, categoryStr)

Functions

QStringList qgcObserveLoggingCategories (QObject *context, std::function< void(const QString &)> observer)

Macro Definition Documentation

◆ QGC_LOGGING_CATEGORY

#define QGC_LOGGING_CATEGORY ( name,
categoryStr )
Value:
static QGCLoggingCategory qgcCategory##name(categoryStr); \
Q_LOGGING_CATEGORY(name, categoryStr, QtWarningMsg)
Process-wide catalogue of unique category names, independent of application services.

Definition at line 11 of file QGCLoggingCategory.h.

◆ QGC_LOGGING_CATEGORY_ON

#define QGC_LOGGING_CATEGORY_ON ( name,
categoryStr )
Value:
static QGCLoggingCategory qgcCategory##name(categoryStr); \
Q_LOGGING_CATEGORY(name, categoryStr, QtInfoMsg)

Definition at line 15 of file QGCLoggingCategory.h.

Function Documentation

◆ qgcObserveLoggingCategories()

QStringList qgcObserveLoggingCategories ( QObject * context,
std::function< void(const QString &)> observer )

Replaces the single process-wide sink and atomically returns the existing catalogue. Subsequent unique registrations are queued to context's thread; the snapshot is not replayed. Install from that thread and keep context alive until concurrent registrations have finished. A null context removes the sink. Replacement does not cancel deliveries already queued to the previous context; destroying that context does. This is not a multi-subscriber API.

Definition at line 36 of file QGCLoggingCategory.cc.