refs #614, categories

This commit is contained in:
Klaus Basan
2016-04-08 13:06:33 +02:00
parent 32ce813bab
commit 5254d0ff71
2 changed files with 22 additions and 12 deletions

View File

@@ -113,6 +113,13 @@ namespace BlackMisc
return cat; return cat;
} }
//! VATSIM specific
static const CLogCategory &vatsimSpecific()
{
static const CLogCategory cat { "swift.vatsim" };
return cat;
}
//! All predefined special categories //! All predefined special categories
//! \note Human readable patterns are defined in CLogPattern::allHumanReadablePatterns //! \note Human readable patterns are defined in CLogPattern::allHumanReadablePatterns
static const QList<CLogCategory> &allSpecialCategories() static const QList<CLogCategory> &allSpecialCategories()
@@ -129,6 +136,7 @@ namespace BlackMisc
swiftDbWebservice(), swiftDbWebservice(),
services(), services(),
validation(), validation(),
vatsimSpecific(),
verification(), verification(),
webservice() webservice()
}; };

View File

@@ -16,19 +16,21 @@ 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()) }, { "validation", exactMatch(CLogCategory::validation()) },
{ "verification", exactMatch(CLogCategory::verification()) }, { "verification", exactMatch(CLogCategory::verification()) },
{ "services", exactMatch(CLogCategory::services()) }, { "services", exactMatch(CLogCategory::services()) },
{ "model mapping", exactMatch(CLogCategory::mapping()) }, { "model mapping", exactMatch(CLogCategory::mapping()) },
{ "swift contexts", exactMatch(CLogCategory::context()) }, { "model matching", exactMatch(CLogCategory::matching()) },
{ "swift context slots", exactMatch(CLogCategory::contextSlot()) }, { "swift contexts", exactMatch(CLogCategory::context()) },
{ "swift GUI", exactMatch(CLogCategory::guiComponent()) }, { "swift context slots", exactMatch(CLogCategory::contextSlot()) },
{ "downloading data", exactMatch(CLogCategory::download()) }, { "swift GUI", exactMatch(CLogCategory::guiComponent()) },
{ "webservice related", exactMatch(CLogCategory::webservice()) }, { "downloading data", exactMatch(CLogCategory::download()) },
{ "VASTIM specific", exactMatch(CLogCategory::vatsimSpecific()) },
{ "webservice related", exactMatch(CLogCategory::webservice()) },
{ "swift DB webservice related", exactMatch(CLogCategory::swiftDbWebservice()) }, { "swift DB webservice related", exactMatch(CLogCategory::swiftDbWebservice()) },
{ "Qt library", startsWith("qt.") }, { "Qt library", startsWith("qt.") },
{ "uncategorized (other)", empty() } { "uncategorized (other)", empty() }
}; };
return patterns; return patterns;
} }