mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Added log categories for driver/plugin
This commit is contained in:
@@ -76,6 +76,12 @@ namespace BlackCore
|
|||||||
CLogMessage(this).info("Initialized simulator driver %1") << m_simulatorPluginInfo.toQString();
|
CLogMessage(this).info("Initialized simulator driver %1") << m_simulatorPluginInfo.toQString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const CLogCategoryList &CSimulatorCommon::getLogCategories()
|
||||||
|
{
|
||||||
|
static const CLogCategoryList cats( { CLogCategory::driver(), CLogCategory::plugin() });
|
||||||
|
return cats;
|
||||||
|
}
|
||||||
|
|
||||||
CSimulatorCommon::~CSimulatorCommon() { }
|
CSimulatorCommon::~CSimulatorCommon() { }
|
||||||
|
|
||||||
bool CSimulatorCommon::logicallyAddRemoteAircraft(const CSimulatedAircraft &remoteAircraft)
|
bool CSimulatorCommon::logicallyAddRemoteAircraft(const CSimulatedAircraft &remoteAircraft)
|
||||||
|
|||||||
@@ -63,6 +63,9 @@ namespace BlackCore
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
//! Log categories
|
||||||
|
static const BlackMisc::CLogCategoryList &getLogCategories();
|
||||||
|
|
||||||
//! Destructor
|
//! Destructor
|
||||||
virtual ~CSimulatorCommon();
|
virtual ~CSimulatorCommon();
|
||||||
|
|
||||||
@@ -79,7 +82,6 @@ namespace BlackCore
|
|||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
|
|
||||||
//! \name Connected with remote aircraft provider signals
|
//! \name Connected with remote aircraft provider signals
|
||||||
//! @{
|
//! @{
|
||||||
//! Slow timer used to highlight aircraft, can be used for other things too
|
//! Slow timer used to highlight aircraft, can be used for other things too
|
||||||
|
|||||||
@@ -124,6 +124,20 @@ namespace BlackMisc
|
|||||||
return cat;
|
return cat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Driver
|
||||||
|
static const CLogCategory &driver()
|
||||||
|
{
|
||||||
|
static const CLogCategory cat { "swift.driver" };
|
||||||
|
return cat;
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Plugin
|
||||||
|
static const CLogCategory &plugin()
|
||||||
|
{
|
||||||
|
static const CLogCategory cat { "swift.plugin" };
|
||||||
|
return cat;
|
||||||
|
}
|
||||||
|
|
||||||
//! Background task
|
//! Background task
|
||||||
static const CLogCategory &worker()
|
static const CLogCategory &worker()
|
||||||
{
|
{
|
||||||
@@ -170,10 +184,12 @@ namespace BlackMisc
|
|||||||
context(),
|
context(),
|
||||||
contextSlot(),
|
contextSlot(),
|
||||||
download(),
|
download(),
|
||||||
|
driver(),
|
||||||
guiComponent(),
|
guiComponent(),
|
||||||
mapping(),
|
mapping(),
|
||||||
matching(),
|
matching(),
|
||||||
network(),
|
network(),
|
||||||
|
plugin(),
|
||||||
swiftDbWebservice(),
|
swiftDbWebservice(),
|
||||||
services(),
|
services(),
|
||||||
settings(),
|
settings(),
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ namespace BlackMisc
|
|||||||
{ "services", exactMatch(CLogCategory::services()) },
|
{ "services", exactMatch(CLogCategory::services()) },
|
||||||
{ "settings", exactMatch(CLogCategory::settings()) },
|
{ "settings", exactMatch(CLogCategory::settings()) },
|
||||||
{ "cache", exactMatch(CLogCategory::cache()) },
|
{ "cache", exactMatch(CLogCategory::cache()) },
|
||||||
|
{ "driver", exactMatch(CLogCategory::driver()) },
|
||||||
|
{ "plugin", exactMatch(CLogCategory::plugin()) },
|
||||||
{ "background task", exactMatch(CLogCategory::worker()) },
|
{ "background task", exactMatch(CLogCategory::worker()) },
|
||||||
{ "model mapping", exactMatch(CLogCategory::mapping()) },
|
{ "model mapping", exactMatch(CLogCategory::mapping()) },
|
||||||
{ "model matching", exactMatch(CLogCategory::matching()) },
|
{ "model matching", exactMatch(CLogCategory::matching()) },
|
||||||
|
|||||||
Reference in New Issue
Block a user