aboutsummaryrefslogtreecommitdiff
path: root/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp')
-rw-r--r--source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp b/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp
index 624ca87b883a..b259804a3a27 100644
--- a/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp
+++ b/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp
@@ -9,10 +9,11 @@
#include "ProcessPOSIXLog.h"
+#include <mutex>
+
#include "lldb/Interpreter/Args.h"
#include "lldb/Core/StreamFile.h"
-#include "ProcessPOSIX.h"
#include "ProcessPOSIXLog.h"
using namespace lldb;
@@ -33,6 +34,22 @@ GetLog ()
return g_log;
}
+void
+ProcessPOSIXLog::Initialize(ConstString name)
+{
+ static std::once_flag g_once_flag;
+
+ std::call_once(g_once_flag, [name](){
+ Log::Callbacks log_callbacks = {
+ DisableLog,
+ EnableLog,
+ ListLogCategories
+ };
+
+ Log::RegisterLogChannel (name, log_callbacks);
+ RegisterPluginName(name);
+ });
+}
Log *
ProcessPOSIXLog::GetLogIfAllCategoriesSet (uint32_t mask)