diff options
author | emaste <emaste@FreeBSD.org> | 2015-07-03 16:57:06 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2015-07-03 16:57:06 +0000 |
commit | 8037fa4ee916fa20b3c63cbf531f4ee7e1c76138 (patch) | |
tree | 3c2e41c3be19b7fc7666ed45a5f91ec3b6e35f2a /source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp | |
parent | d61b076ede88b56f3372a55e7d1eac6a9d717120 (diff) | |
download | FreeBSD-src-8037fa4ee916fa20b3c63cbf531f4ee7e1c76138.zip FreeBSD-src-8037fa4ee916fa20b3c63cbf531f4ee7e1c76138.tar.gz |
Import LLDB as of upstream SVN 241361 (git 612c075f)
Diffstat (limited to 'source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp')
-rw-r--r-- | source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp b/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp index 624ca87..b259804 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) |