Ref T180, log pattern for cmd. line and logging some cmd line activities

This commit is contained in:
Klaus Basan
2017-11-06 18:05:56 +01:00
parent 7db5e9aea3
commit 4fb30fdbc3
4 changed files with 30 additions and 20 deletions

View File

@@ -124,6 +124,13 @@ namespace BlackMisc
return cat;
}
//! Cmd.line parsing
static const CLogCategory &cmdLine()
{
static const CLogCategory cat { "swift.cmdLine" };
return cat;
}
//! Driver
static const CLogCategory &driver()
{
@@ -244,6 +251,7 @@ namespace BlackMisc
{
uncategorized(),
cache(),
cmdLine(),
context(),
contextSlot(),
dataInconsistency(),

View File

@@ -25,35 +25,35 @@ namespace BlackMisc
static const QHash<QString, CLogPattern> patterns
{
{ "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()) },
{ "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 matching", exactMatch(CLogCategory::matching()) },
{ "model loader", exactMatch(CLogCategory::modelLoader()) },
{ "model cache", exactMatch(CLogCategory::modelCache()) },
{ "model set cache", exactMatch(CLogCategory::modelSetCache()) },
{ "model GUI", exactMatch(CLogCategory::modelGui()) },
{ "network (flight)", exactMatch(CLogCategory::network()) },
{ "swift contexts", exactMatch(CLogCategory::context()) },
{ "swift context slots", exactMatch(CLogCategory::contextSlot()) },
{ "swift GUI", exactMatch(CLogCategory::guiComponent()) },
{ "downloading data", exactMatch(CLogCategory::download()) },
{ "VATSIM specific", exactMatch(CLogCategory::vatsimSpecific()) },
{ "webservice related", exactMatch(CLogCategory::webservice()) },
{ "data inconsistency", exactMatch(CLogCategory::dataInconsistency()) },
{ "plugin", exactMatch(CLogCategory::plugin()) },
{ "services", exactMatch(CLogCategory::services()) },
{ "settings", exactMatch(CLogCategory::settings()) },
{ "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 data tool", exactMatch(CLogCategory::swiftDataTool()) },
{ "swift DB webservice related", exactMatch(CLogCategory::swiftDbWebservice()) },
{ "swift GUI", exactMatch(CLogCategory::guiComponent()) },
{ "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.") },
{ "uncategorized (default)", exactMatch("default") },
{ "uncategorized (none)", empty() }

View File

@@ -62,6 +62,7 @@ namespace BlackSimPlugin
{
const bool on = parser.toBool(2);
const bool s = this->useFsuipc(on);
CLogMessage(this, CLogCategory::cmdLine()).info("FSUIPC is '%1'") << boolToOnOff(s);
return s;
}
return false;

View File

@@ -740,6 +740,7 @@ namespace BlackSimPlugin
{
const bool trace = parser.toBool(2);
this->setTraceSendId(trace);
CLogMessage(this, CLogCategory::cmdLine()).info("Tracing FSX/P3D driver sendIds is '%1'") << boolToOnOff(trace);
return true;
}
return CSimulatorFsCommon::parseDetails(parser);