mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-24 09:54:16 +08:00
Ref T180, log pattern for cmd. line and logging some cmd line activities
This commit is contained in:
@@ -124,6 +124,13 @@ namespace BlackMisc
|
|||||||
return cat;
|
return cat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Cmd.line parsing
|
||||||
|
static const CLogCategory &cmdLine()
|
||||||
|
{
|
||||||
|
static const CLogCategory cat { "swift.cmdLine" };
|
||||||
|
return cat;
|
||||||
|
}
|
||||||
|
|
||||||
//! Driver
|
//! Driver
|
||||||
static const CLogCategory &driver()
|
static const CLogCategory &driver()
|
||||||
{
|
{
|
||||||
@@ -244,6 +251,7 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
uncategorized(),
|
uncategorized(),
|
||||||
cache(),
|
cache(),
|
||||||
|
cmdLine(),
|
||||||
context(),
|
context(),
|
||||||
contextSlot(),
|
contextSlot(),
|
||||||
dataInconsistency(),
|
dataInconsistency(),
|
||||||
|
|||||||
@@ -25,35 +25,35 @@ namespace BlackMisc
|
|||||||
static const QHash<QString, CLogPattern> patterns
|
static const QHash<QString, CLogPattern> patterns
|
||||||
{
|
{
|
||||||
{ "uncategorized (swift)", exactMatch(CLogCategory::uncategorized()) },
|
{ "uncategorized (swift)", exactMatch(CLogCategory::uncategorized()) },
|
||||||
{ "validation", exactMatch(CLogCategory::validation()) },
|
|
||||||
{ "verification", exactMatch(CLogCategory::verification()) },
|
|
||||||
{ "services", exactMatch(CLogCategory::services()) },
|
|
||||||
{ "settings", exactMatch(CLogCategory::settings()) },
|
|
||||||
{ "cache", exactMatch(CLogCategory::cache()) },
|
|
||||||
{ "driver", exactMatch(CLogCategory::driver()) },
|
|
||||||
{ "plugin", exactMatch(CLogCategory::plugin()) },
|
|
||||||
{ "wizard", exactMatch(CLogCategory::wizard()) },
|
|
||||||
{ "background task", exactMatch(CLogCategory::worker()) },
|
{ "background task", exactMatch(CLogCategory::worker()) },
|
||||||
|
{ "cache", exactMatch(CLogCategory::cache()) },
|
||||||
|
{ "cmd.line handling", exactMatch(CLogCategory::cmdLine()) },
|
||||||
|
{ "data inconsistency", exactMatch(CLogCategory::dataInconsistency()) },
|
||||||
|
{ "downloading data", exactMatch(CLogCategory::download()) },
|
||||||
|
{ "driver", exactMatch(CLogCategory::driver()) },
|
||||||
|
{ "model cache", exactMatch(CLogCategory::modelCache()) },
|
||||||
|
{ "model GUI", exactMatch(CLogCategory::modelGui()) },
|
||||||
|
{ "model loader", exactMatch(CLogCategory::modelLoader()) },
|
||||||
{ "model mapping", exactMatch(CLogCategory::mapping()) },
|
{ "model mapping", exactMatch(CLogCategory::mapping()) },
|
||||||
{ "model matching", exactMatch(CLogCategory::matching()) },
|
{ "model matching", exactMatch(CLogCategory::matching()) },
|
||||||
{ "model loader", exactMatch(CLogCategory::modelLoader()) },
|
|
||||||
{ "model cache", exactMatch(CLogCategory::modelCache()) },
|
|
||||||
{ "model set cache", exactMatch(CLogCategory::modelSetCache()) },
|
{ "model set cache", exactMatch(CLogCategory::modelSetCache()) },
|
||||||
{ "model GUI", exactMatch(CLogCategory::modelGui()) },
|
|
||||||
{ "network (flight)", exactMatch(CLogCategory::network()) },
|
{ "network (flight)", exactMatch(CLogCategory::network()) },
|
||||||
{ "swift contexts", exactMatch(CLogCategory::context()) },
|
{ "plugin", exactMatch(CLogCategory::plugin()) },
|
||||||
{ "swift context slots", exactMatch(CLogCategory::contextSlot()) },
|
{ "services", exactMatch(CLogCategory::services()) },
|
||||||
{ "swift GUI", exactMatch(CLogCategory::guiComponent()) },
|
{ "settings", exactMatch(CLogCategory::settings()) },
|
||||||
{ "downloading data", exactMatch(CLogCategory::download()) },
|
|
||||||
{ "VATSIM specific", exactMatch(CLogCategory::vatsimSpecific()) },
|
|
||||||
{ "webservice related", exactMatch(CLogCategory::webservice()) },
|
|
||||||
{ "data inconsistency", exactMatch(CLogCategory::dataInconsistency()) },
|
|
||||||
{ "startup phase", exactMatch(CLogCategory::startup()) },
|
{ "startup phase", exactMatch(CLogCategory::startup()) },
|
||||||
{ "swift DB webservice related", exactMatch(CLogCategory::swiftDbWebservice()) },
|
{ "swift context slots", exactMatch(CLogCategory::contextSlot()) },
|
||||||
|
{ "swift contexts", exactMatch(CLogCategory::context()) },
|
||||||
{ "swift core", exactMatch(CLogCategory::swiftCore()) },
|
{ "swift core", exactMatch(CLogCategory::swiftCore()) },
|
||||||
{ "swift data tool", exactMatch(CLogCategory::swiftDataTool()) },
|
{ "swift data tool", exactMatch(CLogCategory::swiftDataTool()) },
|
||||||
|
{ "swift DB webservice related", exactMatch(CLogCategory::swiftDbWebservice()) },
|
||||||
|
{ "swift GUI", exactMatch(CLogCategory::guiComponent()) },
|
||||||
{ "swift pilot client", exactMatch(CLogCategory::swiftPilotClient()) },
|
{ "swift pilot client", exactMatch(CLogCategory::swiftPilotClient()) },
|
||||||
|
{ "validation", exactMatch(CLogCategory::validation()) },
|
||||||
|
{ "VATSIM specific", exactMatch(CLogCategory::vatsimSpecific()) },
|
||||||
|
{ "verification", exactMatch(CLogCategory::verification()) },
|
||||||
|
{ "webservice related", exactMatch(CLogCategory::webservice()) },
|
||||||
|
{ "wizard", exactMatch(CLogCategory::wizard()) },
|
||||||
{ "Qt library", startsWith("qt.") },
|
{ "Qt library", startsWith("qt.") },
|
||||||
{ "uncategorized (default)", exactMatch("default") },
|
{ "uncategorized (default)", exactMatch("default") },
|
||||||
{ "uncategorized (none)", empty() }
|
{ "uncategorized (none)", empty() }
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ namespace BlackSimPlugin
|
|||||||
{
|
{
|
||||||
const bool on = parser.toBool(2);
|
const bool on = parser.toBool(2);
|
||||||
const bool s = this->useFsuipc(on);
|
const bool s = this->useFsuipc(on);
|
||||||
|
CLogMessage(this, CLogCategory::cmdLine()).info("FSUIPC is '%1'") << boolToOnOff(s);
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -740,6 +740,7 @@ namespace BlackSimPlugin
|
|||||||
{
|
{
|
||||||
const bool trace = parser.toBool(2);
|
const bool trace = parser.toBool(2);
|
||||||
this->setTraceSendId(trace);
|
this->setTraceSendId(trace);
|
||||||
|
CLogMessage(this, CLogCategory::cmdLine()).info("Tracing FSX/P3D driver sendIds is '%1'") << boolToOnOff(trace);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return CSimulatorFsCommon::parseDetails(parser);
|
return CSimulatorFsCommon::parseDetails(parser);
|
||||||
|
|||||||
Reference in New Issue
Block a user