aboutsummaryrefslogtreecommitdiff
path: root/external/easylogging++/easylogging++.cc
diff options
context:
space:
mode:
Diffstat (limited to 'external/easylogging++/easylogging++.cc')
-rw-r--r--external/easylogging++/easylogging++.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/external/easylogging++/easylogging++.cc b/external/easylogging++/easylogging++.cc
index 721b2af15..6bc6b2619 100644
--- a/external/easylogging++/easylogging++.cc
+++ b/external/easylogging++/easylogging++.cc
@@ -1961,8 +1961,13 @@ void VRegistry::setCategories(const char* categories, bool clear) {
m_categories.push_back(std::make_pair(ss.str(), level));
};
- if (clear)
+ if (clear) {
m_categories.clear();
+ m_categoriesString.clear();
+ }
+ if (!m_categoriesString.empty())
+ m_categoriesString += ",";
+ m_categoriesString += categories;
if (!categories)
return;
@@ -2001,6 +2006,11 @@ void VRegistry::setCategories(const char* categories, bool clear) {
}
}
+std::string VRegistry::getCategories() {
+ base::threading::ScopedLock scopedLock(lock());
+ return m_categoriesString;
+}
+
// Log levels are sorted in a weird way...
static int priority(Level level) {
if (level == Level::Fatal) return 0;
@@ -3073,6 +3083,10 @@ void Loggers::setCategories(const char* categories, bool clear) {
ELPP->vRegistry()->setCategories(categories, clear);
}
+std::string Loggers::getCategories() {
+ return ELPP->vRegistry()->getCategories();
+}
+
void Loggers::clearCategories(void) {
ELPP->vRegistry()->clearCategories();
}