summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Logging
diff options
context:
space:
mode:
authorRyan Meredith <rwm@udel.edu>2020-07-24 13:58:46 -0400
committerRyan Meredith <rwm@udel.edu>2020-07-24 13:59:13 -0400
commitfdcc6a436b48ffa2b0b09c9f21045cd4f8945f88 (patch)
tree1d02fd2e0284077d9a4a306d30eb55b3c5d9bf54 /Source/Core/Common/Logging
parent520af035d2dec281e8bc43440948621c7e7b1bd9 (diff)
Android: Add Log Configuration to UI
Diffstat (limited to 'Source/Core/Common/Logging')
-rw-r--r--Source/Core/Common/Logging/LogManager.cpp11
-rw-r--r--Source/Core/Common/Logging/LogManager.h3
2 files changed, 14 insertions, 0 deletions
diff --git a/Source/Core/Common/Logging/LogManager.cpp b/Source/Core/Common/Logging/LogManager.cpp
index ba6e33e78d..99ddf83d67 100644
--- a/Source/Core/Common/Logging/LogManager.cpp
+++ b/Source/Core/Common/Logging/LogManager.cpp
@@ -239,6 +239,17 @@ bool LogManager::IsEnabled(LOG_TYPE type, LOG_LEVELS level) const
return m_log[type].m_enable && GetLogLevel() >= level;
}
+std::map<std::string, std::string> LogManager::GetLogTypes()
+{
+ std::map<std::string, std::string> log_types;
+
+ for (const auto& container : m_log)
+ {
+ log_types.emplace(container.m_short_name, container.m_full_name);
+ }
+ return log_types;
+}
+
const char* LogManager::GetShortName(LOG_TYPE type) const
{
return m_log[type].m_short_name;
diff --git a/Source/Core/Common/Logging/LogManager.h b/Source/Core/Common/Logging/LogManager.h
index 3fb99da7ec..69a5fe9132 100644
--- a/Source/Core/Common/Logging/LogManager.h
+++ b/Source/Core/Common/Logging/LogManager.h
@@ -6,6 +6,7 @@
#include <array>
#include <cstdarg>
+#include <map>
#include "Common/BitSet.h"
#include "Common/Logging/Log.h"
@@ -47,6 +48,8 @@ public:
void SetEnable(LOG_TYPE type, bool enable);
bool IsEnabled(LOG_TYPE type, LOG_LEVELS level = LNOTICE) const;
+ std::map<std::string, std::string> GetLogTypes();
+
const char* GetShortName(LOG_TYPE type) const;
const char* GetFullName(LOG_TYPE type) const;