diff options
author | Ed Maste <emaste@FreeBSD.org> | 2015-07-03 16:57:06 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2015-07-03 16:57:06 +0000 |
commit | 5e95aa85bb660d45e9905ef1d7180b2678280660 (patch) | |
tree | 3c2e41c3be19b7fc7666ed45a5f91ec3b6e35f2a /source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp | |
parent | 12bd4897ff0678fa663e09d78ebc22dd255ceb86 (diff) |
Notes
Diffstat (limited to 'source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp')
-rw-r--r-- | source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp b/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp index 15b861feaa823..d4726adc890ef 100644 --- a/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp +++ b/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp @@ -9,6 +9,8 @@ #include "ProcessGDBRemoteLog.h" +#include <mutex> + #include "lldb/Interpreter/Args.h" #include "lldb/Core/StreamFile.h" @@ -16,6 +18,7 @@ using namespace lldb; using namespace lldb_private; +using namespace lldb_private::process_gdb_remote; // We want to avoid global constructors where code needs to be run so here we @@ -32,6 +35,22 @@ GetLog () return g_log; } +void +ProcessGDBRemoteLog::Initialize() +{ + static ConstString g_name("gdb-remote"); + static std::once_flag g_once_flag; + + std::call_once(g_once_flag, [](){ + Log::Callbacks log_callbacks = { + DisableLog, + EnableLog, + ListLogCategories + }; + + Log::RegisterLogChannel (g_name, log_callbacks); + }); +} Log * ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (uint32_t mask) |